/**
 * Blue Motors Southampton - Tyre Search Styles
 * Phase 2: Tyre Services Implementation
 * Our competitive advantage over industry leaders
 */

/* ========================================
   TYRE SEARCH CONTAINER
   ======================================== */

.bms-tyre-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   COMPETITIVE ADVANTAGE HEADER
   ======================================== */

.bms-competitive-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.bms-competitive-header h2 {
    margin: 0 0 15px 0;
    font-size: 2rem;
    font-weight: 700;
}

.competitive-message {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.competitive-message p {
    margin: 8px 0;
    font-size: 1.1rem;
}

/* ========================================
   SEARCH METHODS
   ======================================== */

.bms-search-methods {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.search-method {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-method:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.search-method.active {
    border-color: #1e40af;
    background: #f8faff;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.1);
}

.search-method h3 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 1.3rem;
    font-weight: 600;
}

.method-description p {
    color: #6b7280;
    margin: 0 0 20px 0;
}

/* ========================================
   REGISTRATION SEARCH - ENHANCED STYLING
   ======================================== */

.reg-search-form .input-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 10px;
}

.reg-input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reg-input-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.reg-input,
input.reg-input,
.bms-tyre-search-container .reg-input {
    flex: 1;
    padding: 32px 16px !important;
    background-color: #f5cc11 !important;
    border: 2px solid #e6b800 !important;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    color: #333 !important;
    min-height: 80px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    width: 100%;
}

.reg-input:focus,
input.reg-input:focus,
.bms-tyre-search-container .reg-input:focus {
    outline: none !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(245, 204, 17, 0.3) !important;
    background-color: #f7d117 !important;
}

.reg-input::placeholder,
input.reg-input::placeholder,
.bms-tyre-search-container .reg-input::placeholder {
    color: #666 !important;
    font-weight: normal;
    font-style: italic;
}

.bms-competitive-header h2,
.bms-competitive-header h2 * {
    color: white !important;
    margin: 0 0 15px 0;
    font-size: 2rem;
    font-weight: 700;
}

.btn-primary {
    background: #1e40af;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4b5563;
}

.help-text {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* ========================================
   SIZE SEARCH
   ======================================== */

.size-search-form .size-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.size-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.size-group label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.size-group select {
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    min-width: 80px;
    background: white;
}

.separator {
    font-size: 20px;
    font-weight: bold;
    color: #6b7280;
    margin-top: 20px;
}

/* ========================================
   POPULAR SIZES
   ======================================== */

.popular-sizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.size-button {
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.size-button:hover {
    border-color: #3b82f6;
    background: #f8faff;
}

.size-button small {
    color: #6b7280;
    font-size: 12px;
}

/* ========================================
   VEHICLE INFO DISPLAY
   ======================================== */

.vehicle-info {
    background: #f0f9ff;
    border: 2px solid #0284c7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.vehicle-info h4 {
    margin: 0 0 15px 0;
    color: #0369a1;
    font-size: 1.2rem;
}

.vehicle-details {
    color: #0c4a6e;
}

/* ========================================
   FILTERS
   ======================================== */

.tyre-filters {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.tyre-filters h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.filter-group select {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* ========================================
   RESULTS DISPLAY
   ======================================== */

.tyre-results {
    margin-bottom: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.results-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.4rem;
}

.results-count {
    color: #6b7280;
    font-size: 14px;
}

/* ========================================
   TYRE GRID
   ======================================== */

.tyre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.tyre-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tyre-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.tyre-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tyre-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

.tyre-tier {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.tyre-tier.premium {
    background: #fef3c7;
    color: #92400e;
}

.tyre-tier.mid-range {
    background: #e0e7ff;
    color: #3730a3;
}

.tyre-tier.budget {
    background: #d1fae5;
    color: #065f46;
}

.tyre-model {
    font-size: 1.1rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 8px;
}

.tyre-size {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 20px;
}

/* ========================================
   TYRE SPECIFICATIONS
   ======================================== */

.tyre-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.spec-label {
    color: #6b7280;
    font-size: 14px;
}

.spec-value {
    font-weight: 600;
    color: #1f2937;
}

/* ========================================
   EU LABEL RATINGS
   ======================================== */

.eu-label {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.rating-item:last-child {
    margin-bottom: 0;
}

.rating-label {
    font-size: 12px;
    color: #64748b;
}

.rating-value {
    font-weight: 600;
    font-size: 14px;
}

/* ========================================
   PRICING
   ======================================== */

.tyre-pricing {
    background: #f0f9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.price-per-tyre, .fitting-price {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #0369a1;
}

.total-price {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 2px solid #0284c7;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0c4a6e;
}

.price-label {
    font-size: 14px;
}

.price-value {
    font-weight: 600;
}

/* ========================================
   QUANTITY SELECTOR
   ======================================== */

.quantity-selector {
    margin-bottom: 20px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.tyre-quantity {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 16px;
}

/* ========================================
   ACTIONS
   ======================================== */

.tyre-actions {
    text-align: center;
}

.btn-select-tyre {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
}

.btn-large {
    padding: 20px 40px;
    font-size: 18px;
    font-weight: 700;
}

/* ========================================
   SELECTION SUMMARY
   ======================================== */

.tyre-selection {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.tyre-selection h4 {
    color: #15803d;
    margin: 0 0 20px 0;
    font-size: 1.4rem;
}

.competitive-advantage {
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.competitive-advantage h5 {
    color: #15803d;
    margin: 0 0 15px 0;
}

.competitive-advantage ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.competitive-advantage li {
    padding: 5px 0;
    color: #166534;
}

/* ========================================
   FITTING APPOINTMENT
   ======================================== */

.fitting-appointment {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.appointment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.appointment-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.booking-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ========================================
   SUCCESS STATE
   ======================================== */

.booking-success {
    text-align: center;
    padding: 60px 30px;
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 12px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.booking-success h3 {
    color: #15803d;
    margin: 0 0 30px 0;
    font-size: 2rem;
}

.competitive-celebration {
    background: rgba(34, 197, 94, 0.1);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
}

.advantages-achieved {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.advantage {
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    color: #15803d;
}

.next-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   NO RESULTS STATE
   ======================================== */

.no-results {
    text-align: center;
    padding: 60px 30px;
    background: #fafafa;
    border-radius: 12px;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #6b7280;
}

.no-results h4 {
    color: #374151;
    margin: 0 0 15px 0;
}

.no-results p {
    color: #6b7280;
    margin: 0 0 30px 0;
}

.no-results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

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

@media (max-width: 768px) {
    .bms-tyre-search-container {
        padding: 15px;
    }
    
    .bms-competitive-header {
        padding: 20px;
    }
    
    .bms-competitive-header h2 {
        font-size: 1.5rem;
        color: white !important;
    }
    
    .reg-search-form .input-group {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .reg-input-container {
        width: 100%;
    }
    
    .reg-input-label {
        font-size: 13px;
        text-align: center;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .size-search-form .size-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .separator {
        display: none;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tyre-grid {
        grid-template-columns: 1fr;
    }
    
    .appointment-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .booking-actions {
        flex-direction: column;
    }
    
    .next-actions {
        flex-direction: column;
    }
    
    .advantages-achieved {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .competitive-message {
        padding: 15px;
    }
    
    .search-method {
        padding: 20px;
    }
    
    .tyre-card {
        padding: 20px;
    }
    
    .popular-sizes {
        grid-template-columns: repeat(2, 1fr);
    }
}