/* Classic Theme v4 - v1 styling + transparent Exteel assets */
/* This theme is applied when body has class "theme-classic" */

body.theme-classic {
    /* Original Exteel color palette (v1) */
    --bg-primary: #001a33;
    --bg-secondary: #002244;
    --bg-card: #003366;
    --accent: #ff9900;
    --accent-hover: #ffcc00;
    --text-primary: #e6e6e6;
    --text-secondary: #99ccff;
    --text-muted: #6699cc;
    --border: #004488;
    --success: #00cc66;
    --error: #ff3333;
    --warning: #ffcc00;
    
    /* Typography (v1) */
    font-size: 16px;
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
    background: #002157;
    position: relative;
}

/* ============================================================================
   BACKGROUND MECH - Low z-index, below content but above page background
   ============================================================================ */

body.theme-classic::before {
    content: '';
    position: fixed;
    left: 0;
    bottom: 0;
    width: 450px;
    height: 800px;
    background: url('/static/images/classic/mech-bg.png') no-repeat left bottom;
    background-size: contain;
    z-index: 1;
    pointer-events: none;
}

/* Ensure main content is above background mech */
body.theme-classic .header,
body.theme-classic main,
body.theme-classic .container,
body.theme-classic .footer {
    position: relative;
    z-index: 10;
}

/* ============================================================================
   HEADER - Classic gradient bar style (v1) with Exteel logo
   ============================================================================ */

body.theme-classic .header {
    background: linear-gradient(180deg, #003366 0%, #001a33 100%);
    border-bottom: 2px solid #004488;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Exteel logo - hide text, show image; ensure full clickable area for home link */
body.theme-classic .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    min-height: 45px;
}

body.theme-classic .logo .logo-text {
    display: none; /* Hide text in classic mode */
}

body.theme-classic .logo::before {
    content: '';
    display: inline-block;
    width: 120px;
    height: 45px;
    background: url('/static/images/classic/exteel-logo.png') no-repeat center center;
    background-size: contain;
}

body.theme-classic .logo .logo-admin {
    color: #ff9900;
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Navigation - Orange highlight style (v1) */
body.theme-classic .nav a {
    color: #99ccff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
}

body.theme-classic .nav a:hover {
    color: #ff9900;
    background: transparent;
    border-bottom-color: #ff9900;
}

body.theme-classic .nav a.active {
    color: #ff9900;
    border-bottom-color: #ff9900;
}

/* ============================================================================
   HERO SECTION - Merged Exteel banner + mech
   ============================================================================ */

body.theme-classic .hero {
    position: relative;
    min-height: 350px;
    padding-top: 1rem;
    overflow: hidden;
}

/* Merged banner with mech - within red box: top aligns with text, bottom with hero, 30px gap from text, right at container edge */
body.theme-classic .hero::before {
    content: '';
    position: absolute;
    top: 1rem;
    bottom: 0;
    left: 480px;  /* 450px hero-content max-width + 30px gap */
    right: 0;
    background: url('/static/images/classic/hero-banner-transparent.png') no-repeat right top;
    background-size: contain;
    z-index: 5;
    pointer-events: none;
}

body.theme-classic .hero-content {
    position: relative;
    z-index: 15;
    max-width: 450px;
}

body.theme-classic .hero-title {
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

body.theme-classic .hero-title span {
    color: #ff9900;
}

/* Hide hero-logo and hero-mech divs - using ::before background instead */
body.theme-classic .hero-logo {
    display: none;
}

body.theme-classic .hero-mech {
    display: none;
}

body.theme-classic .hero-subtitle {
    color: #99ccff;
}

body.theme-classic .hero-actions {
    margin-top: 1.5rem;
}

/* ============================================================================
   CARDS - Classic blue gradient panels (v1)
   ============================================================================ */

body.theme-classic .card {
    background: linear-gradient(180deg, #003366 0%, #002244 100%);
    border: 2px solid #004488;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(102, 153, 204, 0.2);
}

body.theme-classic .card-title {
    color: #ff9900;
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #004488;
    background: linear-gradient(90deg, rgba(255, 153, 0, 0.2) 0%, transparent 100%);
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 1rem 2rem;
    border-radius: 6px 6px 0 0;
}

/* Status page rows inside cards */
body.theme-classic .status-row {
    border-bottom: 1px solid #004488;
}
body.theme-classic .status-label {
    color: #99ccff;
}
body.theme-classic .status-dot.ok { background: #00cc66; }
body.theme-classic .status-dot.error { background: #ff3333; }
body.theme-classic .status-dot.warning { background: #ffcc00; }

/* ============================================================================
   FEATURE CARDS
   ============================================================================ */

body.theme-classic .features {
    margin-top: 0;
}

body.theme-classic .feature {
    background: linear-gradient(180deg, rgba(0, 51, 102, 0.5) 0%, rgba(0, 34, 68, 0.5) 100%);
    border: 1px solid #004488;
    border-radius: 8px;
}

body.theme-classic .feature-title {
    color: #ff9900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================================
   FORMS - Classic style inputs (v1)
   ============================================================================ */

body.theme-classic .form-input {
    background: #001a33;
    border: 2px solid #004488;
    border-radius: 4px;
    color: #e6e6e6;
    font-size: 1rem;
}

body.theme-classic .form-input:focus {
    border-color: #ff9900;
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.3);
}

body.theme-classic .form-input::placeholder {
    color: #6699cc;
}

body.theme-classic .form-label {
    color: #99ccff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ============================================================================
   BUTTONS - Orange/gold gradient style (v1)
   ============================================================================ */

body.theme-classic .btn {
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    font-size: 0.9rem;
}

body.theme-classic .btn-primary {
    background: linear-gradient(180deg, #ff9900 0%, #cc7700 100%);
    border: 2px solid #ffcc00;
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.theme-classic .btn-primary:hover {
    background: linear-gradient(180deg, #ffcc00 0%, #ff9900 100%);
    color: #000;
}

body.theme-classic .btn-secondary {
    background: linear-gradient(180deg, #003366 0%, #002244 100%);
    border: 2px solid #004488;
    color: #99ccff;
}

body.theme-classic .btn-secondary:hover {
    background: linear-gradient(180deg, #004488 0%, #003366 100%);
    border-color: #ff9900;
    color: #ff9900;
}

body.theme-classic .btn-danger {
    background: linear-gradient(180deg, #cc0000 0%, #990000 100%);
    border: 2px solid #ff3333;
    color: #fff;
}

body.theme-classic .btn-danger:hover {
    background: linear-gradient(180deg, #ff3333 0%, #cc0000 100%);
}

/* ============================================================================
   ALERTS (v1)
   ============================================================================ */

body.theme-classic .alert {
    border-radius: 4px;
    border-width: 2px;
}

body.theme-classic .alert-error {
    background: linear-gradient(180deg, rgba(255, 51, 51, 0.2) 0%, rgba(153, 0, 0, 0.2) 100%);
    border-color: #ff3333;
}

body.theme-classic .alert-success {
    background: linear-gradient(180deg, rgba(0, 204, 102, 0.2) 0%, rgba(0, 102, 51, 0.2) 100%);
    border-color: #00cc66;
}

body.theme-classic .alert-warning {
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.2) 0%, rgba(153, 102, 0, 0.2) 100%);
    border-color: #ffcc00;
}

/* ============================================================================
   TABLES (v1)
   ============================================================================ */

body.theme-classic .table th {
    color: #ff9900;
    background: rgba(0, 68, 136, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #004488;
}

body.theme-classic .table td {
    border-bottom: 1px solid #003366;
}

body.theme-classic .table tbody tr:hover {
    background: rgba(255, 153, 0, 0.1);
}

/* ============================================================================
   TABS (v1)
   ============================================================================ */

body.theme-classic .tabs {
    border-bottom: 2px solid #004488;
}

body.theme-classic .tab {
    color: #99ccff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

body.theme-classic .tab:hover {
    color: #ff9900;
}

body.theme-classic .tab.active {
    color: #ff9900;
    border-bottom-color: #ff9900;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 153, 0, 0.1) 100%);
}

/* ============================================================================
   BADGES (v1)
   ============================================================================ */

body.theme-classic .badge {
    border-radius: 2px;
    border: 1px solid;
}

body.theme-classic .badge-admin {
    background: linear-gradient(180deg, #ff9900 0%, #cc7700 100%);
    border-color: #ffcc00;
    color: #000;
}

/* ============================================================================
   AUTH PAGES (v1)
   ============================================================================ */

body.theme-classic .auth-title {
    color: #ff9900;
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================================================
   PROFILE PAGE (v1)
   ============================================================================ */

body.theme-classic .profile-callsign {
    color: #ff9900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body.theme-classic .stat-item {
    background: linear-gradient(180deg, #002244 0%, #001a33 100%);
    border: 1px solid #004488;
    border-radius: 4px;
}

body.theme-classic .stat-value {
    color: #ff9900;
}

body.theme-classic .stat-label {
    color: #99ccff;
}

body.theme-classic .mech-item {
    background: linear-gradient(180deg, #002244 0%, #001a33 100%);
    border: 1px solid #004488;
}

/* ============================================================================
   MODAL (v1)
   ============================================================================ */

body.theme-classic .modal-content {
    background: linear-gradient(180deg, #003366 0%, #002244 100%);
    border: 2px solid #004488;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

body.theme-classic .modal-title {
    color: #ff9900;
}

/* ============================================================================
   FOOTER (v1)
   ============================================================================ */

body.theme-classic .footer {
    background: linear-gradient(180deg, #001a33 0%, #000d1a 100%);
    border-top: 2px solid #004488;
}

body.theme-classic .build-info {
    color: #6699cc;
}

/* ============================================================================
   LINKS (v1)
   ============================================================================ */

body.theme-classic a {
    color: #ff9900;
}

body.theme-classic a:hover {
    color: #ffcc00;
}

/* ============================================================================
   SCROLLBARS (v1)
   ============================================================================ */

body.theme-classic ::-webkit-scrollbar {
    width: 12px;
}

body.theme-classic ::-webkit-scrollbar-track {
    background: #001a33;
    border-left: 1px solid #004488;
}

body.theme-classic ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #004488 0%, #003366 100%);
    border: 1px solid #004488;
    border-radius: 6px;
}

body.theme-classic ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff9900 0%, #cc7700 100%);
}

/* ============================================================================
   THEME TOGGLE (v1)
   ============================================================================ */

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.theme-toggle-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-toggle-switch {
    display: flex;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.theme-toggle-switch button {
    padding: 0.35rem 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle-switch button:first-child {
    border-right: 1px solid var(--border);
}

.theme-toggle-switch button:hover {
    color: var(--text-primary);
}

.theme-toggle-switch button.active {
    background: var(--accent);
    color: white;
}

body.theme-classic .theme-toggle-switch button.active {
    background: linear-gradient(180deg, #ff9900 0%, #cc7700 100%);
    color: #000;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    body.theme-classic::before {
        width: 200px;
        height: 400px;
        opacity: 0.5;
    }
    
    body.theme-classic .hero::before,
    body.theme-classic .hero::after {
        display: none;
    }
}
