﻿/* ========================================
   Documents / AddressFiles
   Skyblue / White Masterdata Stil
   ======================================== */

.documents-page {
    position: relative;
    padding-bottom: 48px;
}

/* ---------- Page Header ---------- */

.documents-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 4px 2px;
}

.documents-page-title {
    font-weight: 900;
    letter-spacing: -0.035em;
    color: var(--rr-text-strong, #0f172a);
}

/* ---------- Main Tab ---------- */

.property-documents-tab {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 24px;
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 24px;
}

.property-documents-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.property-documents-title {
    font-weight: 900;
    color: var(--rr-text-strong, #0f172a);
    letter-spacing: -0.02em;
}

.property-documents-muted {
    color: var(--rr-text-secondary, #64748b);
    line-height: 1.4;
}

.property-documents-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Sections ---------- */

.property-documents-section {
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 22px;
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.82) );
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    padding: 20px;
    overflow: hidden;
}

.property-documents-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.property-documents-section-title {
    font-weight: 900;
    color: var(--rr-text-strong, #0f172a);
}

.property-documents-input .mud-input-root,
.property-documents-input .mud-input-control {
    background: rgba(255, 255, 255, 0.9);
}

.property-documents-hint {
    border-radius: 14px;
}

/* ---------- State / Empty Cards ---------- */

.property-documents-state-card,
.property-documents-empty-card {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 22px;
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
    padding: 24px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
}

.property-documents-empty-card {
    min-height: 230px;
    display: grid;
    place-items: center;
    text-align: center;
    border-style: dashed;
}

    .property-documents-empty-card.compact {
        min-height: 180px;
    }

/* ---------- Address Summary ---------- */

.property-documents-address-summary {
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: linear-gradient( 135deg, rgba(250, 250, 250, 0.98), rgba(245, 245, 245, 0.78), rgba(255, 255, 255, 0.95) );
    padding: 14px 16px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

/* ---------- Layout ---------- */

.property-documents-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
    gap: 18px;
    align-items: start;
}

.property-documents-upload-section {
    position: sticky;
    top: 88px;
}

/* ---------- Upload Box ---------- */

.property-documents-upload-box {
    border: 1px dashed rgba(0, 0, 0, 0.35);
    border-radius: 20px;
    background: linear-gradient( 135deg, rgba(250, 250, 250, 0.98), rgba(255, 255, 255, 0.9) );
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .property-documents-upload-box:hover {
        border-color: rgba(0, 0, 0, 0.55);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    }

.property-documents-file-title {
    font-weight: 850;
    color: var(--rr-text-strong, #0f172a);
}

.property-documents-selected-file-text {
    display: block;
    margin-top: 6px;
    color: var(--rr-text-strong, #0f172a);
    font-weight: 750;
}

.property-documents-file-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Document List ---------- */

.property-documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.property-document-row {
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

    .property-document-row:hover {
        transform: translateY(-2px);
        background: linear-gradient( 135deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 0.9) );
        border-color: rgba(0, 0, 0, 0.34);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    }

.property-document-row-main {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
    width: 100%;
}

.property-document-icon {
    width: 46px;
    height: 46px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: rgba(250, 250, 250, 0.95);
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.20);
    flex: 0 0 46px;
}

    .property-document-icon .mud-icon-root {
        font-size: 25px;
    }

.property-document-content {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

    .property-document-content .mud-typography {
        overflow-wrap: normal;
        word-break: normal;
        white-space: normal;
    }

    .property-document-content .property-documents-file-title {
        display: inline-block;
        max-width: 100%;
        overflow-wrap: normal;
        word-break: normal;
    }

.property-document-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 59px;
}

/* ---------- Chips ---------- */

.property-documents-status-chip {
    max-width: 100%;
}

    .property-documents-status-chip .mud-chip-content {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.property-documents-tab .mud-chip-root {
    border-radius: 999px;
    border-color: rgba(0, 0, 0, 0.35) !important;
    color: #374151 !important;
    background: rgba(250, 250, 250, 0.78) !important;
}

/* ---------- Buttons / MudBlazor Polish ---------- */

.property-documents-tab .mud-button-root {
    border-radius: 12px;
    text-transform: none;
    font-weight: 750;
}

.property-documents-tab .mud-input-control {
    margin-top: 0;
}

.property-document-row-actions .mud-button-root {
    border-radius: 12px;
    text-transform: none;
    font-weight: 750;
}

.property-document-row-actions .mud-button-outlined,
.property-documents-file-actions .mud-button-outlined {
    border-color: rgba(0, 0, 0, 0.35) !important;
    color: #374151 !important;
    background: rgba(250, 250, 250, 0.65);
}

    .property-document-row-actions .mud-button-outlined:hover,
    .property-documents-file-actions .mud-button-outlined:hover {
        background: rgba(245, 245, 245, 0.95);
    }

.property-document-row-actions .mud-button-filled,
.property-documents-file-actions .mud-button-filled {
    box-shadow: none;
}

.property-document-row-actions .mud-button-root:disabled {
    background: rgba(226, 232, 240, 0.85) !important;
    color: rgba(100, 116, 139, 0.72) !important;
}

/* ---------- Optional: old documents-card support ---------- */

.documents-root {
    border-radius: 22px;
}

.documents-card {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 20px;
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
    padding: 18px;
    height: 100%;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

    .documents-card:hover {
        transform: translateY(-2px);
        border-color: rgba(0, 0, 0, 0.34);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    }

.documents-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.documents-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(250, 250, 250, 0.95);
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.20);
    flex-shrink: 0;
}

.documents-title {
    font-weight: 850;
    color: var(--rr-text-strong, #0f172a);
}

.documents-meta-box {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 15px;
    background: rgba(250, 250, 250, 0.8);
    padding: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .property-documents-layout {
        grid-template-columns: 1fr;
    }

    .property-documents-upload-section {
        position: static;
    }

    .property-document-row {
        grid-template-columns: 1fr;
    }

    .property-document-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .property-documents-tab {
        padding: 16px;
        border-radius: 20px;
    }

    .property-documents-section {
        padding: 16px;
        border-radius: 18px;
    }

    .documents-page-header,
    .property-documents-header,
    .property-documents-section-head,
    .property-documents-upload-box {
        flex-direction: column;
        align-items: stretch;
    }

    .property-documents-actions,
    .property-documents-file-actions,
    .property-document-row-actions {
        width: 100%;
    }

    .property-document-row-actions {
        padding-left: 0;
    }

        .property-documents-file-actions .mud-button-root,
        .property-document-row-actions .mud-button-root,
        .property-documents-actions .mud-button-root {
            width: 100%;
            justify-content: center;
        }

    .property-document-row-main {
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .documents-page {
        padding-bottom: 32px;
    }

    .property-document-row-main {
        flex-direction: column;
    }

    .property-document-row-actions {
        padding-left: 0;
    }

    .property-document-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
}
