/**
 * Sewa Kendaraan Page Styles
 * DA Trans - Vehicle Rental Page
 */

/* ====================================
   Filter Card
   ==================================== */
.filter-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* ====================================
   Pricing Packages
   ==================================== */
.pricing-packages {
    background: #f8f9fa;
    padding: 40px 0;
}

.pricing-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.pricing-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #1d0f76;
}

.pricing-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #1d0f76;
    opacity: 0;
    transition: all 0.3s ease;
}

.pricing-item:hover::before {
    opacity: 1;
}

.pricing-item.featured {
    border: 2px solid #1d0f76;
}

.pricing-item.featured::before {
    opacity: 1;
}

.pricing-item h3 {
    color: var(--heading-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f8f9fa;
}

.pricing-item h4 {
    font-size: 1.8rem;
    color: #1d0f76;
    font-weight: 700;
    margin: 12px 0;
}

.pricing-item h4 sup {
    font-size: 0.9rem;
    top: -0.8em;
}

.pricing-item h4 span {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 400;
}

.pricing-item ul {
    margin: 15px 0;
    padding: 0;
    list-style: none;
}

.pricing-item ul li {
    padding: 6px 0;
    color: #495057;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    gap: 6px;
}

.pricing-item ul li i {
    color: #2ecc71;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.pricing-item ul li.na {
    color: #adb5bd;
}

.pricing-item ul li.na i {
    color: #dc3545;
}

.pricing-item .buy-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #1d0f76;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #1d0f76;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.pricing-item .buy-btn:hover {
    background: transparent;
    color: #1d0f76;
}

.pricing-item.featured .buy-btn {
    background: #2ecc71;
    border-color: #2ecc71;
}

.pricing-item.featured .buy-btn:hover {
    background: transparent;
    color: #2ecc71;
}

/* ====================================
   Vehicle Cards
   ==================================== */
.vehicle-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.vehicle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.vehicle-card.unavailable {
    opacity: 0.7;
}

.vehicle-img {
    position: relative;
    aspect-ratio: 5/3;
    width: 100%;
    overflow: hidden;
}

.vehicle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vehicle-card:hover .vehicle-img img {
    transform: scale(1.05);
}

.unavailable-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.vehicle-info {
    padding: 25px;
}

.vehicle-info h4 {
    color: var(--heading-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.vehicle-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
}

.spec-item i {
    color: #1d0f76;
}

.vehicle-features {
    margin-bottom: 20px;
}

.feature-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 2px;
    border: 1px solid #e9ecef;
}

.vehicle-price h5 {
    color: #1d0f76;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.vehicle-price small {
    color: #666;
    font-weight: 400;
}

.vehicle-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.vehicle-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* ====================================
   Image Carousel (Universal)
   ==================================== */
.image-carousel,
.vehicle-detail-carousel {
    position: relative;
    overflow: hidden;
    aspect-ratio: 5/3;
    width: 100%;
}

.image-carousel .carousel-item,
.vehicle-detail-carousel .carousel-item {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-carousel .carousel-item.active,
.vehicle-detail-carousel .carousel-item.active {
    display: block;
}

.image-carousel .carousel-item img,
.vehicle-detail-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.image-carousel:hover .carousel-control,
.vehicle-detail-carousel:hover .carousel-control {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ====================================
   Buttons
   ==================================== */
.btn-rent {
    background: #1d0f76;
    border-color: #1d0f76;
}

.btn-rent:hover {
    background: #150b5a;
    border-color: #150b5a;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border-color: #1d0f76;
    color: #1d0f76;
}

.btn-outline-primary:hover {
    background: #1d0f76;
    border-color: #1d0f76;
    color: white;
}

.btn-primary {
    background-color: #1d0f76;
    border-color: #1d0f76;
}

.btn-primary:hover {
    background-color: #150b5a;
    border-color: #150b5a;
}

/* ====================================
   Modal Styling
   ==================================== */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    padding: 2rem 2rem 1rem;
}

.modal-body {
    padding: 1rem 2rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
}

/* Booking Form Styles */
#bookingModal .form-floating>.form-control,
#bookingModal .form-floating>.form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    border: 1px solid #dee2e6;
}

#bookingModal .form-floating>.form-control:focus,
#bookingModal .form-floating>.form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

#bookingModal .form-floating>label {
    font-weight: 500;
    color: #6c757d;
}

#bookingModal .btn-success {
    background-color: #198754;
    border-color: #198754;
}

#bookingModal .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

#bookingModal .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

#bookingModal .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* Form validation styles */
#bookingModal .was-validated .form-control:invalid,
#bookingModal .was-validated .form-select:invalid {
    border-color: #dc3545;
}

#bookingModal .was-validated .form-control:valid,
#bookingModal .was-validated .form-select:valid {
    border-color: #198754;
}

/* Booking Summary */
.booking-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #1d0f76;
}

/* ====================================
   Vehicle Detail Modal
   ==================================== */
.vehicle-detail-wrapper {
    padding: 12px;
}

.vehicle-detail-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.vehicle-detail-image img {
    width: 100%;
    aspect-ratio: 5/3;
    object-fit: cover;
}

.vehicle-detail-carousel {
    border-radius: 8px;
}

.image-overlay {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
}

.vehicle-title {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.price-tag {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.specs-strip {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #495057;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.facility-item:hover {
    background: #e9ecef;
}

.facility-item i {
    color: #198754;
    font-size: 0.9rem;
    flex-shrink: 0;
}

#vehicleDetailModal .modal-dialog {
    max-width: 700px;
}

/* ====================================
   No Image Placeholder
   ==================================== */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 8px;
}

.no-image-placeholder i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.no-image-placeholder span {
    font-size: 0.9rem;
}

/* ====================================
   Focus Management
   ==================================== */
.modal.fade:not(.show) .btn-close {
    display: none;
}

.modal[aria-hidden="true"] * {
    visibility: hidden;
}

.modal[aria-hidden="true"] {
    visibility: visible;
}

/* ====================================
   Responsive Styles
   ==================================== */
@media (max-width: 768px) {
    .pricing-item {
        margin-bottom: 15px;
        text-align: center;
    }

    .pricing-item .col-lg-3 {
        margin-bottom: 20px;
    }

    .vehicle-actions {
        flex-direction: column;
    }

    .vehicle-actions .btn {
        width: 100%;
    }

    .carousel-control {
        width: 30px;
        height: 30px;
        opacity: 1;
    }

    .carousel-control i {
        font-size: 0.8rem;
    }

    .carousel-dots {
        bottom: 10px;
    }

    .dot {
        width: 6px;
        height: 6px;
    }

    .vehicle-detail-image img {
        height: 180px;
    }

    .specs-strip {
        flex-wrap: wrap;
        gap: 15px;
    }
}