/**
 * Tyres Page Specific Styles
 */

/* License Plate Input Section */
.vehicle-lookup-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.license-plate-input-wrapper {
    position: relative;
    display: flex;
}

.license-plate-input-wrapper .input-group {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.license-plate-input-wrapper input {
    border: 2px solid #e0e0e0;
    padding: 15px 20px;
    letter-spacing: 2px;
}

.license-plate-input-wrapper input:focus {
    border-color: var(--primary, #007bff);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.license-plate-input-wrapper button {
    padding: 15px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.license-plate-input-wrapper button:hover {
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.license-plate-input-wrapper .btn {
    border-radius: 0 6px 6px 0;
}

.license-plate-input-wrapper .input-group {
    border-radius: 6px 0 0 6px;
}

.license-plate-input-wrapper .input-group input {
    border-radius: 0;
}

@media (max-width: 768px) {

    .license-plate-input-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .license-plate-input-wrapper .btn {
        border-radius: 6px;
        width: 100%;
        line-height: 30px;
    }

    .license-plate-input-wrapper .input-group input {
        border-radius: 0 6px 6px 0;
    }

}

/* Full Screen Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    padding: 30px;
    color: white;
}

.loading-overlay .spinner-border {
    border-width: 0.3rem;
}

.loading-content p {
    font-weight: 500;
    margin: 0;
    max-width: 400px;
    color: white;
}

/* Vehicle Info Section in Modal */
.vehicle-info-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary, #007bff);
}

.vehicle-info-item {
    display: flex;
    flex-direction: column;
}

.vehicle-info-item strong {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.vehicle-info-item span {
    font-size: 1rem;
    color: #212529;
    font-weight: 500;
    display: block;
    word-wrap: break-word;
}

/* Tyre Size Section */
.tyre-size-section {
    margin-bottom: 40px;
}

.tyre-size-header {
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-radius: 12px 12px 0 0;
    margin-bottom: 20px;
}

.tyre-size-header h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.tyre-size-header .badge {
    font-size: 0.9rem;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Tyres Grid Layout */
.tyres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Single Tyre Card (Grid Item) */
.tyre-card-grid {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tyre-card-grid:hover {
    border-color: var(--primary, #007bff);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.15);
    transform: translateY(-5px);
}

.tyre-card-grid:active {
    transform: translateY(-2px);
}

/* Tyre Card Image Section */
.tyre-card-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tyre-card-image img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tyre-card-grid:hover .tyre-card-image img {
    transform: scale(1.05);
}

.tyre-placeholder {
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    color: #adb5bd;
}

/* Availability Badge */
.availability-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
}

.availability-badge.available {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.availability-badge.unavailable {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

/* Tyre Card Info Section */
.tyre-card-info {
    padding: 20px;
    background: white;
}

.tyre-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tyre-card-model {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 15px 0;
    font-weight: 500;
}

/* Compact Details */
.tyre-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.detail-item {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
}

.detail-item i {
    color: var(--primary, #007bff);
}

/* Tyre Card Price */
.tyre-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.tyre-card-price .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary, #007bff);
}

.tyre-card-price .price-label {
    font-size: 0.8rem;
    color: #6c757d;
}

/* View Details Action */
.tyre-card-action {
    text-align: center;
    padding-top: 10px;
    border-top: 1px dashed #e9ecef;
}

.view-details-text {
    color: var(--primary, #007bff);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.tyre-card-grid:hover .view-details-text {
    gap: 8px;
}

/* Tyre Details Modal */
#tyreDetailsModal .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#tyreDetailsModal .modal-header {
    background: var(--primary);
    color: white;
    border: none;
    padding: 20px 25px;
}

#tyreDetailsModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#tyreDetailsModal .modal-body {
    padding: 30px;
}

.tyre-detail-price {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--primary, #007bff);
}

.tyre-detail-price .price-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.tyre-detail-price .price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary, #007bff);
}

.price-final-detail {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Modal Adjustments */
#tyresModal .modal-xl {
    max-width: 1200px;
}

#tyresModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Error State */
#error-message {
    max-width: 600px;
    margin: 20px auto;
    animation: slideDown 0.3s ease-out;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .vehicle-info-item strong {
        font-size: 0.75rem;
    }

    .vehicle-info-item span {
        font-size: 0.9rem;
    }

    .tyre-size-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 15px;
    }

    .tyre-size-header h5 {
        font-size: 1rem;
    }

    .tyre-size-header .badge {
        margin-top: 10px;
    }

    /* License plate input */
    .license-plate-input-wrapper input {
        font-size: 1rem;
        padding: 12px 15px;
    }

    .license-plate-input-wrapper button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Loading overlay mobile */
    .loading-content p {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    /* Grid adjusts to single column on mobile */
    .tyres-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tyre-card-grid {
        max-width: 100%;
    }

    .tyre-card-image {
        min-height: 160px;
        padding: 20px 15px;
    }

    .tyre-card-image img {
        max-height: 140px;
    }

    .tyre-card-info {
        padding: 15px;
    }

    .tyre-card-price .price {
        font-size: 1.5rem;
    }

    .tyre-card-title {
        font-size: 0.95rem;
    }

    .tyre-card-model {
        font-size: 0.85rem;
    }

    #tyresModal .modal-dialog {
        margin: 0.5rem;
    }

    #tyresModal .modal-body {
        max-height: 60vh;
        padding: 20px;
    }

    #tyreDetailsModal .modal-body {
        padding: 20px;
    }

    .tyre-detail-price .price-value {
        font-size: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tyres-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .tyres-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .tyres-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Input Flag (UK Flag) */
.input-flag {
    display: flex;
    flex-direction: column;
    width: 50px;
    align-items: center;
    justify-content: center;
    background-color: #2935d0;
}

.input-flag span {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.flag-icon {
    width: 20px;
    height: 20px;
}

/* Section Separator */
.section-separator {
    position: relative;
}

.section-separator::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary, #007bff);
    border-radius: 2px;
}

/* Trust Signals */
.trust-signal-item {
    padding: 20px;
    transition: transform 0.3s ease;
}

.trust-signal-item:hover {
    transform: translateY(-5px);
}

.trust-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Final CTA */
.final-cta-section {
    background: var(--primary);
    color: white;
}

.final-cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.final-cta-section .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

/* Phone Modal */
#phoneModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

#phoneModal .modal-header {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
}

#phoneModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#phoneModal .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1.1rem;
}

#phoneModal .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* No Tyres Conversion Section - Compact */
.no-tyres-conversion {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    max-width: 600px;
    margin: 0 auto;
}

.conversion-header {
    margin-bottom: 20px;
}

.conversion-header i {
    animation: pulse 2s ease-in-out infinite;
}

.conversion-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
    margin-top: 0;
}

.conversion-header p {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.conversion-benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.benefit-compact {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.benefit-compact i {
    font-size: 1rem;
}

.conversion-note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 10px;
    margin-bottom: 0;
}

.no-tyres-conversion .btn {
    font-weight: 600;
    padding: 12px 30px;
}

/* Pulse Animation for Icon */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Responsive - Conversion Section */
@media (max-width: 768px) {
    .no-tyres-conversion {
        padding: 20px 15px;
    }

    .conversion-header h4 {
        font-size: 1.1rem;
    }

    .conversion-header p {
        font-size: 0.9rem;
    }

    .conversion-header i {
        font-size: 2rem;
    }

    .conversion-benefits {
        gap: 8px;
    }

    .benefit-compact {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .no-tyres-conversion .btn {
        font-size: 0.95rem;
        padding: 10px 20px;
    }
}

/* Vehicle Tyre Details Section */
/* .vehicle-tyre-details-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.vehicle-tyre-details-section h6 {
    margin-bottom: 15px;
    font-weight: 600;
} */

.tyre-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.tyre-detail-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.tyre-detail-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.tyre-detail-card-clickable {
    cursor: pointer;
    position: relative;
}

.tyre-detail-card-clickable:hover {
    border-color: var(--primary, #007bff);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.tyre-detail-card-clickable.active {
    border-color: var(--primary, #007bff);
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.25);
    background: #f8fbff;
}

.tyre-detail-card-hint {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.tyre-detail-card-clickable:hover .tyre-detail-card-hint,
.tyre-detail-card-clickable.active .tyre-detail-card-hint {
    color: var(--primary, #007bff);
}

.tyres-results-placeholder {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin-bottom: 1.5rem;
}

.tyre-detail-size {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #007bff;
    font-size: 1rem;
}

.tyre-detail-size i {
    font-size: 0.9rem;
}

.tyre-detail-specs {
    display: flex;
    gap: 4px;
}

.spec-item {
    font-size: 0.85rem;
    color: #6c757d;
}

.spec-item strong {
    color: #495057;
    margin-right: 4px;
}

/* Responsive - Tyre Details */
@media (max-width: 768px) {
    .tyre-details-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .tyre-detail-card {
        padding: 10px 12px;
    }

    .tyre-detail-size {
        font-size: 0.9rem;
    }

    .spec-item {
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tyre Search Box with Tabs */
.tyre-search-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tyre-search-box .nav-tabs {
    border-bottom: none;
    background-color: #f8f9fa;
    padding: 0;
}

.tyre-search-box .nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: #6c757d;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tyre-search-box .nav-tabs .nav-link:hover {
    background-color: #e9ecef;
    color: #495057;
}

.tyre-search-box .nav-tabs .nav-link.active {
    background-color: #fff;
    color: #0d6efd;
    border-bottom: 3px solid #0d6efd;
}

.tyre-search-box .tab-content {
    background: #fff;
}

.tyre-search-box h5 {
    color: #212529;
    font-weight: 600;
}

.tyre-search-box .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.tyre-search-box .form-select,
.tyre-search-box .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.tyre-search-box .form-select:focus,
.tyre-search-box .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.hero-section .main-actions {
    margin-top: 1rem;
}

/* Unavailable Tyre Cards */
.tyre-card-grid[data-available="false"] {
    opacity: 0.75;
    border-color: #dee2e6;
}

.tyre-card-grid[data-available="false"]:hover {
    border-color: #adb5bd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0.85;
}

.tyre-card-grid[data-available="false"] .tyre-card-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.tyre-card-grid[data-available="false"] .tyre-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.tyre-card-grid[data-available="false"] .tyre-card-image img {
    filter: grayscale(20%);
}

.tyre-card-grid[data-available="false"] .tyre-card-price .price {
    color: #6c757d;
}

/* Responsive - Tyre Search Box */
@media (max-width: 991px) {
    .tyre-search-box .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .tyre-search-box .nav-tabs .nav-link {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .tyre-search-box .nav-tabs .nav-link i {
        display: none;
    }

    .tyre-search-box h5 {
        font-size: 1rem;
    }

    .tyre-search-box .text-muted {
        font-size: 0.85rem;
    }
}