/* wwwroot/css/theme.css - Elephas Ordering & MDReview Application Theme */

/* ============================================================================
   CSS CUSTOM PROPERTIES (CSS Variables)
   ============================================================================ */
:root {
    /* Ordering System Brand Colors (existing) */
    --ele-brand-50: #f6eef9;
    --ele-brand-200: #e4daf2;
    --ele-brand-300: #ccb9e8;
    --ele-brand-500: #6d2577; /* primary */
    --ele-brand-700: #571d5f;
    --ele-gray-600: #5b6b7a;
    --ele-gray-300: #c8cfd6;

    /* MDReview Brand Colors (from elephas-theme.css) */
    --elephas-primary: #6a1f75;
    --elephas-secondary: #b150c5;
    --elephas-dark: #00205c;
    --elephas-light: #EFE1EF;
    --elephas-bg: #EEEEEE;
    --elephas-text: #333232;

    /* RGB channel values for alpha transparency support */
    --elephas-primary-rgb: 106, 31, 117;  /* #6a1f75 */
    --elephas-secondary-rgb: 177, 80, 197; /* #b150c5 */

    /* Typography */
    --font-family-base: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================================
   SCOPED THEME FOR ORDERING SYSTEM
   ============================================================================ */
.ele-theme {
    /* Font (applies only inside app shell) - uses Montserrat for consistency with MDReview */
    font-family: var(--font-family-base);
}

    /* Buttons inside app */
    .ele-theme .btn-primary {
        background-color: var(--ele-brand-500) !important;
        border-color: var(--ele-brand-500) !important;
    }

        .ele-theme .btn-primary:hover,
        .ele-theme .btn-primary:focus,
        .ele-theme .btn-primary:active {
            background-color: var(--ele-brand-700) !important;
            border-color: var(--ele-brand-700) !important;
        }

    /* Links inside app */
    .ele-theme a:not(.btn) {
        color: var(--ele-brand-700);
    }

        .ele-theme a:not(.btn):hover {
            color: var(--ele-brand-500);
        }
    /* Circular icon-only buttons */
    .ele-theme .btn-icon {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50% !important; /* force circle */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

        .ele-theme .btn-icon i {
            font-size: 1.1rem;
            line-height: 1;
        }

/* ============================================================================
   MDREVIEW SPECIFIC STYLES
   ============================================================================ */

/* Navigation */
.elephas-navbar {
    background: linear-gradient(135deg, var(--elephas-dark) 0%, var(--elephas-primary) 50%, var(--elephas-secondary) 100%) !important;
    position: relative;
    overflow: hidden;
}

.elephas-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--elephas-primary) 0%, var(--elephas-secondary) 100%);
}

/* Gradient backgrounds */
.elephas-gradient {
    background: linear-gradient(135deg, var(--elephas-primary) 0%, var(--elephas-secondary) 100%);
}

/* Buttons */
.btn-elephas {
    background: linear-gradient(135deg, var(--elephas-primary) 0%, var(--elephas-secondary) 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(var(--elephas-primary-rgb), 0.3);
}

.btn-elephas:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--elephas-primary-rgb), 0.4);
    color: white;
}

/* Form controls */
.elephas-select {
    border: 2px solid var(--elephas-light);
    border-radius: 4px;
    font-family: var(--font-family-base);
    font-weight: 500;
    background: white;
    color: var(--elephas-text);
    transition: all 0.3s;
}

.elephas-select:focus {
    outline: none;
    border-color: var(--elephas-secondary);
    box-shadow: 0 0 0 3px rgba(var(--elephas-secondary-rgb), 0.1);
}

/* Text colors */
.elephas-primary {
    color: var(--elephas-primary) !important;
}

.elephas-secondary {
    color: var(--elephas-secondary) !important;
}

/* Brand text */
.brand-text {
    font-weight: 600;
    font-size: 1.25rem;
    color: white !important;
}

.navbar-logo {
    height: 32px;
    width: auto;
    margin-right: 12px;
    object-fit: contain;
}

/* Font weights */
.font-semibold {
    font-weight: 600 !important;
}

/* Table styling - purple headers (override Bootstrap) */
.table thead th {
    background: var(--elephas-primary) !important;
    color: white !important;
    font-weight: 600 !important;
    border: none !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--elephas-primary-rgb), 0.05);
}

/* MVS Table Drill-Down Styling */
/* Explicit stripe class since Bootstrap table-striped doesn't work with interleaved collapse rows */
#mvScoreTable tbody tr.table-stripe > td {
    --bs-table-bg-type: var(--bs-table-striped-bg);
}

/* Keep collapse/detail rows white */
#mvScoreTable tr.collapse td {
    background-color: white !important;
}

#mvScoreTable tr.collapse:hover td {
    background-color: white !important;
}

#mvScoreTable .collapse .table tbody tr:hover td {
    background-color: transparent !important;
}

/* ============================================================================
   LOADING MODAL OVERLAY
   ============================================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #6a1f75;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body.loading {
    overflow: hidden;
}

body.page-transition {
    cursor: wait;
}