/* RideRemap - Vehicle Tuning Page - Advanced Styling with Glassmorphism & Animations */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* UK Car Registration Font - Charles Wright 2001 (Mandatory/Prescribed Font) */
/* 
 * To use the authentic UK number plate font:
 * 1. Obtain Charles Wright 2001 font files (woff2, woff, or ttf)
 * 2. Place them in assets/fonts/ directory
 * 3. Uncomment the @font-face declaration below
 */

/* Uncomment when font files are available:
@font-face {
    font-family: 'Charles Wright 2001';
    src: url('../fonts/CharlesWright2001.woff2') format('woff2'),
         url('../fonts/CharlesWright2001.woff') format('woff'),
         url('../fonts/CharlesWright2001.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
*/

/* UK Number Plate style - uses system fonts that closely match UK plates */
/* Helvetica and Arial are acceptable alternatives to Charles Wright 2001 */
@font-face {
    font-family: 'UK Number Plate';
    src: local('Helvetica Neue'),
         local('Helvetica'),
         local('Arial'),
         local('sans-serif');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-yellow: #FFD700;
    --primary-blue: #00BFFF;
    --primary-pink: #FF007F;
    --light-blue: #87CEEB;
    --dark-blue: #1a1a2e;
    --bg-light: #f0f2f5;
    --bg-white: #FFFFFF;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    pointer-events: none;
}

.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -200px;
    right: -200px;
    animation-delay: 5s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

.shape-4 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    top: 20%;
    right: 10%;
    animation-delay: 15s;
}

.shape-5 {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, #fa709a, #fee140);
    bottom: 10%;
    left: 20%;
    animation-delay: 20s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Glassmorphism Navigation - Now in common.css */
/* Keeping this for tuning-specific overrides if needed */

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    padding: 2.5rem;
    transition: all 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.search-section-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

.results-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

.section-title {
    color: var(--text-dark) !important;
    font-weight: 700;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

/* Input Styles - UK Car Registration Font */
/* Note: .yellow-input styles are defined below with .flag-badge and .go-btn for integrated design */

.blue-select {
    background: linear-gradient(135deg, #87CEEB, #00BFFF) !important;
    border: 2px solid #00BFFF !important;
    color: var(--text-dark) !important;
    font-weight: 600;
    padding: 15px 20px;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

.blue-select option {
    background: white !important;
    color: var(--text-dark) !important;
    opacity: 1 !important;
}

.blue-select:focus {
    background: linear-gradient(135deg, #00BFFF, #87CEEB) !important;
    border-color: #00BFFF !important;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
    outline: none;
}

/* Flag Badge - Darker, more prominent */
.flag-badge {
    background: #1a1a2e !important; /* Darker, solid background */
    color: white !important;
    font-weight: 700 !important;
    border: none !important;
    border-right: 2px solid rgba(255, 255, 255, 0.1) !important;
    font-size: 1.2rem !important;
    padding: 15px 20px !important;
    min-width: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border-radius: 12px 0 0 12px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.flag-badge::before {
    content: '🇬🇧';
    font-size: 1.4rem;
    line-height: 1;
}

/* Registration Input - Enhanced styling */
.yellow-input {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    border: none !important;
    border-left: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-right: none !important;
    color: var(--text-dark) !important;
    font-weight: 900 !important;
    font-size: 2rem !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    padding: 15px 45px 15px 25px !important; /* Extra right padding for spinner */
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
    font-family: 'Charles Wright 2001', 'UK Number Plate', 'Helvetica', 'Arial', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.2 !important;
    text-align: center !important;
    flex: 1 !important;
    min-width: 200px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 12px 12px 0 !important; /* Rounded right corner since no button */
}

.yellow-input.loading {
    padding-right: 50px !important;
}

.yellow-input.loading::placeholder {
    opacity: 0.5 !important;
}

.yellow-input::placeholder {
    color: rgba(26, 26, 46, 0.6) !important;
    opacity: 1 !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    font-size: 2rem !important;
    font-family: 'Charles Wright 2001', 'UK Number Plate', 'Helvetica', 'Arial', sans-serif !important;
}

.yellow-input:focus {
    background: linear-gradient(135deg, #FFA500, #FFD700) !important;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    outline: none;
    border-left: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.loading-spinner .spinner-border-sm {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
    border-color: var(--text-dark);
    border-right-color: transparent;
}

/* Input Group without button */
.reg-input-group .position-relative {
    flex: 1;
    display: flex;
}

/* Input Group - Enhanced container */
.input-group {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    background: transparent !important;
    border: none !important;
}

.input-group-lg > .form-control,
.input-group-lg > .form-select,
.input-group-lg > .input-group-text {
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
    border-radius: 0 !important;
}

.input-group-lg > .input-group-text:first-child {
    border-radius: 12px 0 0 12px !important;
}

/* Input group styling without button */
.reg-input-group .yellow-input {
    border-radius: 0 12px 12px 0 !important;
}

/* Glass Footer */
.glass-footer {
    background: rgba(26, 26, 46, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95) !important;
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: auto;
}

/* Vehicle Image with Glassmorphism */
.car-image-wrapper {
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vehicle-image-glassy {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 15px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.vehicle-image-glassy:hover {
    transform: scale(1.05) rotateY(5deg);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: pulse-glow 3s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Performance Stats with Glassmorphism */
.performance-stats-glass {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item-glass {
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

.stat-bar-glass {
    margin-bottom: 15px;
}

.stat-label-glass {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark) !important;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1 !important;
    visibility: visible !important;
}

.progress-glass {
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.progress-bar-glass {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.stat-value-glass {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark) !important;
    margin-top: 5px;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Glass Buttons */
.btn-pink-glass {
    background: linear-gradient(135deg, #FF007F, #FF1493) !important;
    border: 2px solid #FF007F !important;
    color: white !important;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 0, 127, 0.3);
}

.btn-pink-glass:hover {
    background: linear-gradient(135deg, #FF1493, #FF007F) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 0, 127, 0.5);
    color: white !important;
}

.btn-blue-glass {
    background: linear-gradient(135deg, #00BFFF, #1E90FF) !important;
    border: 2px solid #00BFFF !important;
    color: white !important;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 191, 255, 0.3);
}

.btn-blue-glass:hover {
    background: linear-gradient(135deg, #1E90FF, #00BFFF) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 191, 255, 0.5);
    color: white !important;
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(255, 0, 127, 0.3);
    }
    50% {
        box-shadow: 0 5px 30px rgba(255, 0, 127, 0.6);
    }
}

/* Promo Badge */
.promo-badge {
    text-align: right;
}

.promo-badge .badge {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 10px;
}

/* Tuning Page Wrapper */
.tuning-page-wrapper {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
}

/* Registration Input Group - Enhanced styling */
.reg-input-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
}

.reg-input-group .flag-badge,
.reg-input-group .yellow-input {
    height: auto !important;
    min-height: 70px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .vehicle-image-glassy {
        max-height: 250px;
    }
    
    .shape {
        width: 200px !important;
        height: 200px !important;
    }
    
    /* Smaller font for mobile */
    .yellow-input {
        font-size: 1.5rem !important;
        letter-spacing: 2px !important;
        padding: 12px 15px !important;
    }
    
    .yellow-input::placeholder {
        font-size: 1.5rem !important;
        letter-spacing: 1.5px !important;
    }
    
    .flag-badge {
        font-size: 1rem !important;
        padding: 12px 15px !important;
        min-width: 60px !important;
    }
    
    .loading-spinner {
        right: 10px !important;
    }
    
    .loading-spinner .spinner-border-sm {
        width: 1.2rem !important;
        height: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    .yellow-input {
        font-size: 1.25rem !important;
        letter-spacing: 1.5px !important;
        padding: 10px 12px !important;
    }
    
    .yellow-input::placeholder {
        font-size: 1.25rem !important;
        letter-spacing: 1px !important;
    }
    
    .flag-badge {
        font-size: 0.9rem !important;
        padding: 10px 12px !important;
        min-width: 50px !important;
    }
    
    .loading-spinner {
        right: 8px !important;
    }
    
    .loading-spinner .spinner-border-sm {
        width: 1rem !important;
        height: 1rem !important;
    }
}

/* Loading Animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Message Alerts */
.alert {
    border-radius: 12px;
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

/* Price Modal Styles */
#priceModal .modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

#priceModal .modal-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#priceModal .form-control {
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 15px;
}

#priceModal .form-control:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

#priceModal textarea {
    resize: vertical;
    min-height: 100px;
}

/* Ensure text content is visible */
.tuning-page-wrapper p,
.tuning-page-wrapper h1,
.tuning-page-wrapper h2,
.tuning-page-wrapper h3,
.tuning-page-wrapper h4,
.tuning-page-wrapper h5,
.tuning-page-wrapper h6,
.tuning-page-wrapper span:not(.shape),
.tuning-page-wrapper label,
.tuning-page-wrapper .text-dark,
.tuning-page-wrapper .text-muted {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

.text-dark {
    color: var(--text-dark) !important;
    opacity: 1 !important;
}

.text-muted {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* Container visibility */
.container, .container-fluid {
    position: relative;
    z-index: 2;
}

