/* ================================================================
   SCHEME & SCHEME ENQUIRY STYLES (Desktop & Mobile Responsive)
   Premium Gold & Ivory Luxury Aesthetic for Jewelers
   ================================================================ */
@import url('scheme-details-style.css');

.mg-enquiry-wrap {
    background: #faf8f5;
    min-height: 80vh;
}

/* Header Banner */
.customer-portal-header {
    background: linear-gradient(135deg, #1b2430 0%, #0f1722 100%) !important;
    padding: 24px 0 !important;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4) !important;
}

.customer-portal-header h1 {
    color: #ffffff !important;
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 6px !important;
}

.customer-portal-header .page-breadcrumb-links {
    font-size: 0.85rem;
    color: #c9b185;
}

.customer-portal-header .page-breadcrumb-links a {
    color: #f1dfb8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.customer-portal-header .page-breadcrumb-links a:hover {
    color: #ffffff;
}

.customer-portal-header .page-breadcrumb-links .sep {
    margin: 0 8px;
    opacity: 0.6;
}

.customer-portal-header .page-breadcrumb-links .current-page {
    color: #e5c378;
    font-weight: 600;
}

/* Table Card (Desktop) */
.mg-enquiry-card-wrap {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 30px;
}

.mg-enquiry-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.mg-enquiry-table thead {
    background: #fbf8f2;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.mg-enquiry-table thead th {
    padding: 14px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3d3024;
    border: none;
    vertical-align: middle;
}

.mg-enquiry-table tbody tr {
    transition: background 0.2s ease;
    border-bottom: 1px solid #f2ede4;
}

.mg-enquiry-table tbody tr:last-child {
    border-bottom: none;
}

.mg-enquiry-table tbody tr:hover {
    background: #faf6ee;
}

.mg-enquiry-table td {
    padding: 16px;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #f2ede4;
    font-size: 0.9rem;
    color: #2b2118;
}

/* Scheme Title & Link */
.mg-enquiry-scheme-link {
    font-weight: 700;
    color: #1e293b;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.mg-enquiry-scheme-link:hover {
    color: #aa820a;
}

.mg-enquiry-scheme-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 3px;
    display: block;
}

/* Message Bubble */
.mg-enquiry-msg-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #334155;
    max-width: 320px;
    line-height: 1.45;
}

/* Status Badges */
.mg-enquiry-status-badge {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
}

.mg-enquiry-status-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.mg-enquiry-status-badge.read {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.mg-enquiry-status-badge.enrolled {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.mg-enquiry-status-badge.rejected {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.mg-enquiry-time {
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

/* Empty State Card */
.mg-enquiry-empty-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    padding: 50px 30px;
    text-align: center;
    max-width: 620px;
    margin: 20px auto;
}

.mg-enquiry-empty-icon {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: linear-gradient(135deg, #faf0da 0%, #f6e2b8 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #8c671a;
    margin-bottom: 20px;
}

.mg-enquiry-empty-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #241c14;
    margin-bottom: 10px;
}

.mg-enquiry-empty-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 24px auto;
}

.mg-btn-browse-schemes {
    background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 30px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(168, 128, 42, 0.35);
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.mg-btn-browse-schemes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(168, 128, 42, 0.45);
    color: #ffffff !important;
}

/* ================================================================
   📱 PHONE VIEW (< 768px) SPECIFIC OPTIMIZATIONS
   ================================================================ */
@media (max-width: 767.98px) {
    .mg-enquiry-wrap {
        padding-top: 10px !important;
        padding-bottom: 95px !important; /* Space above #mg_bottom_nav_bar */
        padding-left: 8px !important;
        padding-right: 8px !important;
        overflow-x: hidden !important;
    }

    .mg-enquiry-wrap .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .mg-enquiry-wrap .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .customer-portal-header {
        padding: 16px 0 !important;
    }

    .customer-portal-header h1 {
        font-size: 1.25rem !important;
    }

    .customer-portal-header .page-breadcrumb-links {
        font-size: 0.76rem !important;
    }

    /* Transform Table to Mobile Cards */
    .mg-enquiry-card-wrap {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 10px !important;
    }

    .mg-enquiry-table,
    .mg-enquiry-table thead,
    .mg-enquiry-table tbody,
    .mg-enquiry-table tr,
    .mg-enquiry-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .mg-enquiry-table thead {
        display: none !important;
    }

    .mg-enquiry-table tbody tr {
        background: #ffffff !important;
        border: 1px solid rgba(212, 175, 55, 0.25) !important;
        border-radius: 14px !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04) !important;
        margin-bottom: 14px !important;
        padding: 14px !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .mg-enquiry-table td {
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }

    .mg-enquiry-table td.td-sn {
        display: none !important;
    }

    .mg-enquiry-mobile-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px solid #f2ede4;
        padding-bottom: 8px !important;
        margin-bottom: 4px !important;
    }

    .mg-enquiry-mobile-date {
        font-size: 0.76rem;
        color: #64748b;
    }

    .mg-enquiry-scheme-link {
        font-size: 0.95rem !important;
    }

    .mg-enquiry-msg-box {
        max-width: 100% !important;
        font-size: 0.82rem !important;
        padding: 6px 10px !important;
    }

    /* Empty Card on Mobile */
    .mg-enquiry-empty-card {
        padding: 35px 16px !important;
        border-radius: 16px !important;
    }

    .mg-enquiry-empty-icon {
        width: 70px !important;
        height: 70px !important;
        font-size: 1.8rem !important;
    }

    .mg-enquiry-empty-title {
        font-size: 1.25rem !important;
    }

    .mg-enquiry-empty-desc {
        font-size: 0.85rem !important;
    }

    .mg-btn-browse-schemes {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }
}
