/* Vehicle Grid Layout */
.rac-vehicle-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1200px) {
    .grid-4,
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .grid-3,
    .grid-4,
    .grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .rac-vehicle-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Vehicle Card */
.rac-vehicle-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rac-vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.vehicle-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.rac-vehicle-card:hover .vehicle-image img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    line-height: 1;
}

.status-badge.available { background: #28a745; }
.status-badge.on_rent { background: #007bff; }
.status-badge.return_today { background: #fd7e14; }
.status-badge.overdue { background: #dc3545; }
.status-badge.in_garage,
.status-badge.in_repair { background: #ffc107; color: #212529; }

.return-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Vehicle Info */
.vehicle-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vehicle-title {
    margin: 0 0 15px;
    font-size: 18px;
    line-height: 1.3;
}

.vehicle-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.vehicle-title a:hover {
    color: #007bff;
}

.vehicle-meta {
    margin-bottom: 15px;
    flex: 1;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 14px;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-item .label {
    color: #6c757d;
    font-weight: 500;
}

.meta-item .value {
    color: #212529;
    font-weight: 600;
}

/* Pricing */
.vehicle-pricing {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 15px;
}

.daily-rate {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    line-height: 1;
}

.rate-period {
    color: #6c757d;
    font-size: 14px;
}

/* Rental Info */
.rental-info,
.next-booking {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.rental-info .info-item,
.next-booking {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0056b3;
}

/* Actions */
.vehicle-actions {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
}

.vehicle-actions .button {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.view-details {
    background: #6c757d;
    color: white;
}

.view-details:hover {
    background: #5a6268;
    color: white;
}

.book-now {
    background: #28a745;
    color: white;
}

.book-now:hover {
    background: #218838;
    color: white;
}

/* Filters */
.rac-vehicle-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-field {
    margin-bottom: 0;
    min-width: 200px;
    flex: 1;
}

.rac-search-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.rac-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.rac-status-filter,
.rac-type-filter {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    background: white;
    cursor: pointer;
}

.rac-status-filter:focus,
.rac-type-filter:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.filter-button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-button:hover {
    background: #0056b3;
}

.filter-reset {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 10px;
    transition: color 0.3s;
}

.filter-reset:hover {
    color: #007bff;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-field {
        min-width: auto;
        width: 100%;
    }
}

.rac-search-input,
.rac-status-filter,
.rac-type-filter,
.rac-fuel-filter {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.rac-search-input:focus,
.rac-status-filter:focus,
.rac-type-filter:focus,
.rac-fuel-filter:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.rac-search-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Date input styles */
input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

input[type="date"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* No Vehicles Message */
.no-vehicles {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Single Vehicle Page */
.rac-single-vehicle-container {
    padding: 40px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-lg-8, .col-lg-4 {
    padding: 0 15px;
    box-sizing: border-box;
}

.col-8 { width: 66.666%; }
.col-4 { width: 33.333%; }
.col-lg-8 { width: 66.666%; }
.col-lg-4 { width: 33.333%; }

@media (max-width: 992px) {
    .col-lg-8,
    .col-lg-4 {
        width: 100%;
        margin-bottom: 30px;
    }
}

.text-right {
    text-align: right;
}

@media (max-width: 768px) {
    .col-8,
    .col-4 {
        width: 100%;
        text-align: center !important;
    }
    
    .text-right {
        text-align: center;
    }
}

/* Form Styles */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    margin: 0;
    font-size: 20px;
    color: #212529;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close:hover {
    color: #212529;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Elementor Specific */
.elementor-widget-rac_vehicle_grid .rac-vehicle-grid {
    display: grid;
    gap: 30px;
}

.elementor-widget-rac_vehicle_grid .rac-vehicle-filters {
    margin-bottom: 30px;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Utility Classes */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

/* Print Styles */
@media print {
    .vehicle-actions,
    .rac-booking-widget,
    .rac-quick-actions {
        display: none !important;
    }
    
    .rac-single-vehicle-container {
        padding: 0;
    }
    
    .container {
        max-width: 100%;
    }
}

/* Form Validation Styles */
.rac-booking-form input.error,
.rac-booking-form textarea.error,
.rac-booking-form select.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.25) !important;
}

.rac-booking-form input.error:focus,
.rac-booking-form textarea.error:focus,
.rac-booking-form select.error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.25) !important;
}

/* Modal Backdrop */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon .dashicons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 40px;
}

/* Datepicker fix */
.ui-datepicker {
    z-index: 99999 !important;
    font-family: inherit;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .rac-main-content {
        grid-template-columns: 1fr;
    }
    
    .card-specs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-dialog {
        width: 95%;
    }
}

@media (max-width: 576px) {
    .card-specs {
        grid-template-columns: 1fr;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .btn-view-details,
    .btn-book-now {
        width: 100%;
    }
}