/* Car Rental Plugin Styles */

.crwi-search-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.crwi-search-form h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
    margin-bottom: 1.5rem;
}

.crwi-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    gap: 1rem;
}

.crwi-form-group {
    flex: 1;
    min-width: 200px;
}

.crwi-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.crwi-form-group input,
.crwi-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.crwi-form-group input:focus,
.crwi-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.crwi-search-btn {
    background: #007cba;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.crwi-search-btn:hover {
    background: #005a87;
}

.crwi-search-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Search Results */
.crwi-search-results {
    margin-top: 2rem;
}

.crwi-car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.crwi-car-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.crwi-car-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.crwi-car-image {
    height: 200px;
    background: #f0f0f0;
    background-size: cover;
    background-position: center;
    position: relative;
}

.crwi-car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crwi-car-content {
    padding: 1.5rem;
}

.crwi-car-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.crwi-car-details {
    color: #666;
    font-size: 14px;
    margin-bottom: 1rem;
}

.crwi-car-details span {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.25rem;
}

.crwi-car-features {
    font-size: 12px;
    color: #888;
    margin-bottom: 1rem;
}

.crwi-price-section {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.crwi-base-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: #007cba;
    margin-bottom: 0.5rem;
}

.crwi-price-note {
    font-size: 12px;
    color: #888;
}

/* Extra Services */
.crwi-extra-services {
    margin: 1rem 0;
}

.crwi-extra-services h4 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 14px;
}

.crwi-service-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.crwi-service-item:last-child {
    border-bottom: none;
}

.crwi-service-info {
    flex: 1;
}

.crwi-service-name {
    font-weight: 500;
    font-size: 14px;
}

.crwi-service-price {
    color: #666;
    font-size: 12px;
}

/* Booking Section */
.crwi-booking-section {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.crwi-total-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 0.5rem;
}

.crwi-book-car {
    background: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.crwi-book-car:hover {
    background: #218838;
}

.crwi-book-car:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading and Error States */
.crwi-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
}

.crwi-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

.crwi-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

.crwi-no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* OTP Verification Modal */
.crwi-otp-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.crwi-otp-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.crwi-otp-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin: 1rem 0;
}

.crwi-otp-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.crwi-otp-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crwi-otp-btn.primary {
    background: #007cba;
    color: white;
}

.crwi-otp-btn.primary:hover {
    background: #005a87;
}

.crwi-otp-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.crwi-otp-btn.secondary:hover {
    background: #e9ecef;
}

/* Loyalty Points */
.crwi-loyalty-points {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.points-balance {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.loyalty-transactions {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.loyalty-transactions th,
.loyalty-transactions td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.loyalty-transactions th {
    background: #f8f9fa;
    font-weight: 600;
}

.loyalty-transactions .earned {
    color: #28a745;
    font-weight: 600;
}

.loyalty-transactions .redeemed {
    color: #dc3545;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crwi-form-row {
        flex-direction: column;
    }
    
    .crwi-form-group {
        min-width: auto;
    }
    
    .crwi-car-grid {
        grid-template-columns: 1fr;
    }
    
    .crwi-search-form {
        padding: 1rem;
    }
    
    .crwi-otp-content {
        margin: 30% auto;
        padding: 1rem;
    }
    
    .crwi-otp-buttons {
        flex-direction: column;
    }
}

/* Admin Styles */
.crwi-extra-services-list label {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.crwi-extra-services-list input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Car Details Page */
.crwi-car-details {
    max-width: 800px;
    margin: 0 auto;
}

.crwi-car-details-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.crwi-car-details-image {
    border-radius: 8px;
    overflow: hidden;
}

.crwi-car-details-image img {
    width: 100%;
    height: auto;
}

.crwi-car-details-info h1 {
    margin-bottom: 1rem;
    color: #333;
}

.crwi-car-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.crwi-spec-item {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.crwi-spec-label {
    font-size: 12px;
    color: #666;
    display: block;
}

.crwi-spec-value {
    font-weight: 600;
    color: #333;
}

@media (max-width: 768px) {
    .crwi-car-details-header {
        grid-template-columns: 1fr;
    }
    
    .crwi-car-specs {
        grid-template-columns: 1fr;
    }
}
