/**
 * ملخص المزاد — عمودي (جانبي) + عريض (تحت الأصول)
 * ألوان متناسقة مع بطاقات العقارات (تركواز + كحلي)
 */
.mec-auction-closing-summary {
    --mec-acs-navy: #00334e;
    --mec-acs-teal: #45a09a;
    --mec-acs-border: #e8ecf1;
    --mec-acs-muted: #64748b;
    --mec-acs-surface: #f4f8fa;

    margin-bottom: 1.5rem;
    padding: 0;
    direction: rtl;
    font-size: 15px;
    line-height: 1.45;
}

/* ===== كرت مشترك ===== */
.mec-auction-closing-summary .mec-acs-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--mec-acs-border);
    box-shadow: 0 2px 12px rgba(0, 51, 78, 0.07);
    overflow: hidden;
}

.mec-auction-closing-summary .mec-acs-card-header {
    background: linear-gradient(180deg, #e8f4f8 0%, #f4f9fb 55%, #fff 100%);
    border-bottom: 2px solid var(--mec-acs-navy);
    padding: 16px 20px 14px;
}

.mec-auction-closing-summary .mec-acs-card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mec-acs-navy);
    line-height: 1.3;
    text-align: right;
    letter-spacing: -0.01em;
}

.mec-auction-closing-summary .mec-acs-card-body {
    padding: 4px 0 0;
}

/* ===== أيقونات ===== */
.mec-auction-closing-summary .mec-acs-icon-wrap {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--mec-acs-surface);
    border: 1px solid rgba(69, 160, 154, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mec-acs-teal);
}

.mec-auction-closing-summary .mec-acs-icon-wrap--cell {
    width: 38px;
    height: 38px;
}

.mec-auction-closing-summary .mec-acs-svg {
    display: block;
}

/* ===== نصوص مشتركة ===== */
.mec-auction-closing-summary .mec-acs-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--mec-acs-navy);
    line-height: 1.35;
}

.mec-auction-closing-summary .mec-acs-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--mec-acs-navy);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.mec-auction-closing-summary .mec-acs-value--prominent {
    font-size: 1.0625rem;
    margin-top: 6px;
    display: block;
}

.mec-auction-closing-summary .mec-acs-desc {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.55;
    color: var(--mec-acs-muted);
    text-align: right;
}

.mec-auction-closing-summary .mec-acs-footnote {
    margin: 0;
    padding: 16px 20px 18px;
    border-top: 1px solid var(--mec-acs-border);
    font-size: 0.6875rem;
    line-height: 1.65;
    color: var(--mec-acs-muted);
    text-align: right;
    background: #fafbfc;
}

/* ========== تخطيط عمودي (الشريط الجانبي) ========== */
.mec-auction-closing-summary--stacked .mec-acs-stacked {
    list-style: none;
    margin: 0;
    padding: 8px 16px 4px;
}

.mec-auction-closing-summary--stacked .mec-acs-stacked-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 6px;
    align-items: center;
    padding: 16px 4px;
    border-bottom: 1px solid var(--mec-acs-border);
}

.mec-auction-closing-summary--stacked .mec-acs-stacked-item--last {
    border-bottom: none;
}

.mec-auction-closing-summary--stacked .mec-acs-icon-wrap {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin-top: 2px;
}

.mec-auction-closing-summary--stacked .mec-acs-stacked-middle {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    text-align: right;
}

.mec-auction-closing-summary--stacked .mec-acs-value {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
    direction: ltr;
    unicode-bidi: isolate;
    align-self: center;
    max-width: 11rem;
    word-break: break-word;
}

.mec-auction-closing-summary--stacked .mec-acs-desc {
    grid-column: 2 / 4;
    grid-row: 2;
}

/* ========== تخطيط عريض (تحت الأصول) ========== */
.mec-auction-closing-summary--wide {
    margin-top: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}

.mec-auction-closing-summary--wide .mec-acs-card-body {
    padding-top: 0;
}

.mec-auction-closing-summary--wide .mec-acs-grid {
    list-style: none;
    margin: 0;
    padding: 16px 14px 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.mec-auction-closing-summary--wide .mec-acs-cell {
    margin: 0;
    min-width: 0;
}

.mec-auction-closing-summary--wide .mec-acs-cell-inner {
    height: 100%;
    padding: 16px 14px 14px;
    background: #f4fbfa;
    border: 1px solid var(--mec-acs-border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 51, 78, 0.04);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* خلفيات فاتحة مختلفة لكل بطاقة — تمييز بصري مع الحفاظ على الرقي */
.mec-auction-closing-summary--wide .mec-acs-cell:nth-child(1) .mec-acs-cell-inner {
    background: linear-gradient(160deg, #eef9f8 0%, #f5fcfb 70%, #fafefe 100%);
    border-color: rgba(69, 160, 154, 0.12);
}

.mec-auction-closing-summary--wide .mec-acs-cell:nth-child(2) .mec-acs-cell-inner {
    background: linear-gradient(160deg, #ecf6f0 0%, #f4faf6 70%, #fafcfa 100%);
    border-color: rgba(46, 125, 90, 0.11);
}

.mec-auction-closing-summary--wide .mec-acs-cell:nth-child(3) .mec-acs-cell-inner {
    background: linear-gradient(160deg, #eef3fb 0%, #f5f8fd 70%, #fafcfe 100%);
    border-color: rgba(59, 99, 168, 0.1);
}

.mec-auction-closing-summary--wide .mec-acs-cell:nth-child(4) .mec-acs-cell-inner {
    background: linear-gradient(160deg, #fdf6ec 0%, #fefaf3 70%, #fffdf9 100%);
    border-color: rgba(180, 130, 70, 0.12);
}

.mec-auction-closing-summary--wide .mec-acs-cell:nth-child(5) .mec-acs-cell-inner {
    background: linear-gradient(160deg, #f8f2f6 0%, #fbf6f9 70%, #fefafc 100%);
    border-color: rgba(140, 90, 120, 0.1);
}

.mec-auction-closing-summary--wide .mec-acs-cell:nth-child(6) .mec-acs-cell-inner {
    background: linear-gradient(160deg, #f0f4f8 0%, #f6f9fc 70%, #fafcfe 100%);
    border-color: rgba(0, 51, 78, 0.09);
}

.mec-auction-closing-summary--wide .mec-acs-cell-inner:hover {
    border-color: rgba(69, 160, 154, 0.35);
    box-shadow: 0 4px 14px rgba(0, 51, 78, 0.08);
    filter: brightness(1.02);
}

.mec-auction-closing-summary--wide .mec-acs-cell-head {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.mec-auction-closing-summary--wide .mec-acs-cell-head .mec-acs-label {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
}

.mec-auction-closing-summary--wide .mec-acs-value--prominent {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--mec-acs-border);
    font-size: 1.125rem;
    color: var(--mec-acs-teal);
}

.mec-auction-closing-summary--wide .mec-acs-cell-inner .mec-acs-desc {
    margin-top: 10px;
    flex-grow: 1;
}

/* ========== استجابة ========== */
@media (max-width: 992px) {
    .mec-auction-closing-summary--wide .mec-acs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .mec-auction-closing-summary--wide .mec-acs-grid {
        grid-template-columns: 1fr;
        padding-left: 12px;
        padding-right: 12px;
    }

    .mec-auction-closing-summary--stacked .mec-acs-stacked-item {
        grid-template-columns: 38px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }

    .mec-auction-closing-summary--stacked .mec-acs-icon-wrap {
        grid-row: 1;
    }

    .mec-auction-closing-summary--stacked .mec-acs-stacked-middle {
        grid-column: 2;
        grid-row: 1;
    }

    .mec-auction-closing-summary--stacked .mec-acs-value {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: right;
        max-width: none;
        margin-top: 4px;
        padding-bottom: 2px;
    }

    .mec-auction-closing-summary--stacked .mec-acs-desc {
        grid-column: 1 / -1;
        grid-row: 3;
    }
}
