/* Styles for Estimate partial (_EstimatePartial.cshtml) - extracted from estimate.css */

/* Estimate partial container */
#EstimatePartialContents .card-body, #EstimatePartialContents { padding: 0.75rem; }

/* Estimate summary */
.estimate-summary { background: transparent; border: none; box-shadow: none; border-radius: 0; max-width: 100%; padding: 0.25rem 0; }

.estimate-title { font-size: 1rem; font-weight: 700; margin: 0 0 0.4rem 0; color: #222; }

.estimate-row { padding: 0.25rem 0.4rem; border-bottom: 1px solid rgba(0,0,0,0.04); }

/* 大画面ではグリッドで横に広げて余白を有効活用 */
@media (min-width: 768px) {
    .estimate-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 8px 12px;
        align-items: center;
    }

    .estimate-pair { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .estimate-pair .estimate-label { flex: 0 0 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #666; }
    .estimate-pair .estimate-value { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .estimate-pair .estimate-size { font-size: 0.85rem; white-space: normal; overflow: visible; text-overflow: clip; }
}

.estimate-row:last-of-type {
    border-bottom: none;
}

.estimate-label {
    color: #444;
    font-weight: 700;
    font-size: 0.9rem;
}

.estimate-value {
    color: #222;
    font-size: 0.95rem;
}

.estimate-price-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.45rem 0.5rem;
}

.estimate-price-label {
    color: #444;
    font-weight: 600;
    font-size: 0.95rem;
}

.estimate-price {
    font-size: 1.08rem;
    font-weight: 700;
    color: #111;
    padding: 0;
    background: none;
    border-radius: 0;
}

.unit {
    color: #666;
    font-size: 0.9rem;
    margin-left: 6px;
}

@media (max-width: 576px) {
    .estimate-summary {
        padding: 0.3rem 0;
    }

    .estimate-row {
        padding: 0.35rem 0.3rem;
    }

    .estimate-price {
        font-size: 1rem;
    }
}

/* 固定表示用スタイル: 右上に固定 */
@media (min-width: 768px) {
    .estimate-summary-fixed {
        position: fixed;
        top: 1rem; /* ナビなどの高さに合わせて調整 */
        z-index: 1050;
        /* 固定時も元の .card 見た目をそのまま維持するため、
           background / padding / border 等は上書きしない */
    }

    /* プレースホルダーは見えないが高さを確保 */
    .estimate-placeholder {
        display: block;
        visibility: hidden;
        /* プレースホルダーはカードの外側マージンを模倣できるように
           JS 側で margin を設定します */
    }

    /* 固定時は幅を内包せずに左座標を使うため右プロパティは無視される。
       JS側で left を設定している。 */
}
