/* admin.css */

/* Fonts & Base */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* Color Customizer Styling for Mobile */
.color-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.25rem;
}

.color-row {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Color input improvements - use small circular swatches */
.color-input, .color-display {
    width: 40px;
    height: 40px;
    border-radius: 9999px; /* fully rounded */
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .color-list-container {
        gap: 0.5rem;
    }
    .color-row {
        flex-direction: row;
        gap: 0.75rem;
    }
    .color-input, .color-display {
        width: 36px;
        height: 36px;
    }
}

/* Sidebar Navigation States */
.sidebar-link.active {
    background-color: #f59e0b; /* Amber-500 */
    color: white;
}

.sidebar-link:hover:not(.active) {
    background-color: #f3f4f6; /* Gray-100 */
    color: #d97706; /* Amber-600 */
}

/* Mobile Sidebar Transitions */
#sidebar {
    transition: transform 0.3s ease-in-out;
}

/* Class toggled by JS for mobile menu */
.sidebar-open #sidebar {
    transform: translateX(0);
}

.sidebar-closed #sidebar {
    transform: translateX(-100%);
}

/* Desktop: Always show sidebar */
@media (min-width: 768px) {
    .sidebar-closed #sidebar {
        transform: translateX(0);
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Order Details - Expandable Section */
.order-details-row {
    transition: all 0.3s ease-in-out;
}

/* Mobile-only clickable rows */
@media (max-width: 767px) {
    tr[onclick] {
        cursor: pointer;
        user-select: none;
    }
    
    tr[onclick]:active {
        background-color: #f9fafb;
    }

    /* Order Modal Styling for Mobile */
    #admin-order-modal .relative {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        border-radius: 16px;
        padding: 18px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.25);
        overflow: hidden;
    }

    #admin-order-modal .relative h3 {
        font-size: 1.05rem;
    }

    #admin-order-modal .relative p { font-size: 0.9rem; }

    #admin-order-modal .relative .grid {
        grid-template-columns: 1fr;
    }

    #admin-order-modal .relative #modal-order-items {
        max-height: 38vh;
        overflow-y: auto;
        padding-right: 6px;
    }

    /* Make action buttons stack full-width on small screens */
    #admin-order-modal .relative .mt-4 {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    #admin-order-modal .relative .mt-4 button {
        width: 100%;
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    /* Emphasize total price and status badge */
    #admin-order-modal .relative #modal-order-total { font-size: 1.5rem; }
    #admin-order-modal .relative #modal-status-badge span { font-size: 0.8rem; padding: 6px 8px; }
}
