/* Account Page Styles - Responsive Order Cards */

.order-card {
    transition: box-shadow 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}

.order-header {background-color: #5b0d11;}

.order-header h3 {font-family: "Microsoft JhengHei"}

.wines-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 0.8fr;
    gap: 15px;
    padding: 15px 20px;
    background-color: #531514;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85em;
    border-bottom: 2px solid #7a0126;
}

.wine-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 0.8fr;
    gap: 15px;
    align-items: center;
}

/* Orders Search Bar Styles */
.orders-search-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 30px 0 10px;
}

.orders-search-bar label {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
    color: #877e7a;
}

.orders-search-bar input {
    padding: 12px 14px;
    border: 1px solid #dde7ea;
    border-radius: 6px;
    font-size: 1em;
}

/* Empty State Styles */
.orders-search-empty {
    display: none;
    padding: 20px;
    text-align: center;
    color: #7a0126;
    background-color: #f7f8f2;
    border: 1px dashed #dde7ea;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Dashboard Compact Header Styles */
.dashboard-compact-header {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dde7ea;
}

.dashboard-info {
    flex: 1;
}

.dashboard-info .contact-b-t {
    margin-bottom: 5px;
}

.dashboard-info .contact-b-t h3 {
    margin: 0;
    font-size: 1.5em;
}

.dashboard-info p {
    margin: 0;
    font-size: 0.95em;
    color: #666;
    line-height: 1.4;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.orders-search-bar {
    margin: 0 0 15px 0 !important;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .order-header h3 {
        font-size: 1.25em !important;
    }

    .order-header p {
        font-size: 1.5em !important;
    }

    .order-header > div {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .order-status-badge {
        margin-top: 10px;
    }

    /* Hide the header row on mobile */
    .wines-header {
        display: none !important;
    }

    /* On mobile, show wine items as stacked cards with labels */
    .wine-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .wine-row > div {
        position: relative;
        padding-left: 0 !important;
    }

    /* Add labels back for mobile view */
    .wine-row > div:not(:first-child)::before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        color: #877e7a;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-size: 0.75em;
        margin-bottom: 4px;
    }

    .wine-item > div > div:nth-child(4) {
        text-align: left !important;
    }

    .download-invoice-btn {
        width: 100%;
        justify-content: center !important;
    }

    .orders-search-bar {
        margin-top: 20px;
    }

    .dashboard-compact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-actions button {
        width: 100%;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    .order-header {
        padding: 15px !important;
    }

    .wine-item {
        padding: 15px !important;
    }

    .order-header h3 {
        font-size: 1.1em !important;
    }

    .order-header p {
        font-size: 1.3em !important;
    }
}

/* Print Styles */
@media print {
    .download-invoice-btn,
    #revoke-device-btn {
        display: none !important;
    }

    .order-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}

/* Smooth animations */
.wine-item,
.order-card,
.download-invoice-btn {
    transition: all 0.3s ease;
}

/* Accessibility - Focus states */
.download-invoice-btn:focus {
    outline: 2px solid #f7f8f2;
    outline-offset: 2px;
}

#revoke-device-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading and Empty States */
#loading-container {
    font-family: 'DidotBold', serif;
    color: #7a0126;
    font-size: 1.2em;
}

#orders-list:empty::after {
    content: "No orders to display";
    display: block;
    text-align: center;
    padding: 40px;
    color: #877e7a;
    font-style: italic;
}
