/* Modern UI styles for ShowCar and ShowBike pages */

/* Carousel improvements */
.vehicle-carousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.vehicle-carousel .carousel-inner {
    margin-top: 0 !important;
}

.vehicle-carousel img {
    max-height: 650px;
    object-fit: cover;
    width: 100%;
}

.vehicle-carousel .carousel-indicators {
    margin-bottom: 1rem;
}

.vehicle-carousel .carousel-indicators li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.9);
    margin: 0 6px;
}

.vehicle-carousel .carousel-indicators .active {
    background-color: #fff;
    width: 14px;
    height: 14px;
}

.vehicle-carousel .carousel-control-prev,
.vehicle-carousel .carousel-control-next {
    width: 50px;
    background-color: rgba(44, 62, 80, 0.7);
    border-radius: 0;
}

.vehicle-carousel .carousel-control-prev:hover,
.vehicle-carousel .carousel-control-next:hover {
    background-color: rgba(44, 62, 80, 0.9);
}

/* Maximize button */
.carousel-maximize-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background-color: rgba(44, 62, 80, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 1.2rem;
}

.carousel-maximize-btn:hover {
    background-color: rgba(44, 62, 80, 1);
    transform: scale(1.1);
}

/* Fullscreen mode styles */
/* Overlay container that holds the cloned carousel */
.carousel-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 0 24px 0; /* reduce padding so images can grow */
}

.carousel-overlay.hidden { display:none; }

.carousel-fullscreen {
    width: 100%;
    max-width: 95vw;
    height: calc(100vh - 32px); /* occupy viewport minus overlay padding */
    margin: 0 auto;
    position: relative;
    background: transparent; /* overlay provides backdrop */
    display: flex;
    flex-direction: column;
}

.carousel-fullscreen .carousel-inner {
    flex: 1 1 auto;
    height: 100%;
    display: flex;
    align-items: center;
}

.carousel-fullscreen .carousel-item {
    height: 100%;
    width: 100%;
    display: none; /* manter oculto como comportamento bootstrap */
    text-align: center;
}
.carousel-fullscreen .carousel-item.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-fullscreen .carousel-item img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

.carousel-fullscreen .carousel-control-prev,
.carousel-fullscreen .carousel-control-next {
    width: 80px;
    height: 80px;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-fullscreen .carousel-indicators {
    bottom: 20px;
}

/* Center inner and items while in fullscreen */
/* remove previous flex overrides */

/* Hide page chrome when fullscreen active */
/* Avoid hiding rest of page forcibly; overlay blocks interaction */

/* Close button for fullscreen mode */
.carousel-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    font-size: 1.5rem;
    color: #2c3e50;
    line-height: 1;
}

.carousel-fullscreen .carousel-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-close-btn:hover {
    background-color: #fff;
    transform: scale(1.1);
}

.carousel-fullscreen .carousel-maximize-btn {
    display: none;
}

/* Vehicle details card */
.vehicle-details-card {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
}

.vehicle-details-card .card-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-bottom: none;
    padding: 1.5rem 1.25rem;
}

.vehicle-details-card .card-header h4 {
    color: #fff;
    margin: 0.5rem 0;
    font-weight: 600;
}

.vehicle-details-card .card-header .view-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.vehicle-details-card .card-body {
    padding: 2rem 1.25rem;
}

/* Price display */
.vehicle-price {
    font-size: 2.5rem;
    color: #27ae60;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Description section */
.vehicle-description {
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background-color: #f8f9fa;
    border-left: 4px solid #2c3e50;
    border-radius: 4px;
}

/* Section headers */
.vehicle-section-header {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
}

.vehicle-section-header::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    margin-right: 0.75rem;
    border-radius: 2px;
}

.vehicle-section-divider {
    border: none;
    height: 2px;
    background: linear-gradient(to right, #2c3e50 0%, rgba(44, 62, 80, 0.1) 100%);
    margin: 0.5rem 0 1.5rem 0;
}

/* Feature lists */
.vehicle-features-list {
    list-style: disc;
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
}

.vehicle-features-list li {
    padding: 0.5rem 0.5rem 0.5rem 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Contact information */
.vehicle-contact-info {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border: 1px solid #e9ecef;
}

.vehicle-contact-info .vehicle-features-list li {
    color: #333;
}

/* Validation notice */
.validation-notice {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.validation-notice label {
    color: #856404;
    margin: 0;
    font-size: 0.95rem;
}

/* Footer buttons */
.vehicle-footer-buttons {
    padding: 1.25rem;
    background-color: #f8f9fa;
    border-top: 2px solid #e9ecef;
}

.vehicle-footer-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.vehicle-footer-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Reduce carousel size by 8% on large screens */
@media (min-width: 768px) {
    .vehicle-carousel img {
        max-height: 598px; /* 650px - (650px * 0.08) = 598px */
    }
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .vehicle-carousel img {
        max-height: 450px;
    }

    .vehicle-price {
        font-size: 2rem;
    }

    .vehicle-features-list {
        grid-template-columns: 1fr;
    }

    .vehicle-details-card .card-body {
        padding: 1.5rem 1rem;
    }

    .vehicle-section-header {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .vehicle-features-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print styles */
@media print {
    .vehicle-carousel .carousel-control-prev,
    .vehicle-carousel .carousel-control-next,
    .vehicle-carousel .carousel-indicators,
    .vehicle-footer-buttons {
        display: none;
    }
}

/* YouTube video container styles */
.youtube-video-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background-color: #000;
}

.youtube-video-container .embed-responsive {
    border-radius: 12px;
}

.youtube-video-container iframe {
    border: none;
    border-radius: 12px;
}

@media (max-width: 767px) {
    .youtube-video-container {
        margin: 1rem 0;
    }
}

@media print {
    .youtube-video-container {
        display: none;
    }
}
