/**
 * Car Hire Nairobi - Public Styles
 */

/* General Reset */
.chr-wrap * {
    box-sizing: border-box;
}

/* Typography */
.chr-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
}

.chr-wrap h1, .chr-wrap h2, .chr-wrap h3, .chr-wrap h4 {
    margin: 0 0 15px;
    line-height: 1.3;
}

/* Buttons */
.chr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chr-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.chr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.chr-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.chr-btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.chr-btn-outline:hover {
    background: #667eea;
    color: #fff;
}

.chr-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.chr-btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.chr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forms */
.chr-form-group {
    margin-bottom: 20px;
}

.chr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.chr-form-group .required {
    color: #dc3545;
}

.chr-form-group input[type="text"],
.chr-form-group input[type="email"],
.chr-form-group input[type="tel"],
.chr-form-group input[type="number"],
.chr-form-group input[type="date"],
.chr-form-group input[type="time"],
.chr-form-group input[type="password"],
.chr-form-group select,
.chr-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.chr-form-group input:focus,
.chr-form-group select:focus,
.chr-form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chr-form-group .chr-help-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.chr-form-row {
    display: flex;
    gap: 20px;
}

.chr-form-row .chr-form-group {
    flex: 1;
}

/* Cards */
.chr-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chr-card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.chr-card-body {
    padding: 20px;
}

.chr-card-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

/* Status Badges */
.chr-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.chr-status-pending { background: #fff3cd; color: #856404; }
.chr-status-confirmed { background: #d4edda; color: #155724; }
.chr-status-in_progress { background: #cce5ff; color: #004085; }
.chr-status-completed { background: #d4edda; color: #155724; }
.chr-status-cancelled { background: #f8d7da; color: #721c24; }
.chr-status-approved { background: #d4edda; color: #155724; }
.chr-status-rejected { background: #f8d7da; color: #721c24; }

/* Tables */
.chr-table {
    width: 100%;
    border-collapse: collapse;
}

.chr-table th,
.chr-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.chr-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.chr-table tbody tr:hover {
    background: #f8f9fa;
}

/* Alerts */
.chr-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.chr-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.chr-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.chr-alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.chr-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading Spinner */
.chr-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: chr-spin 1s linear infinite;
}

@keyframes chr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chr-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Vehicle Cards */
.chr-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.chr-vehicle-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.chr-vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.chr-vehicle-image {
    height: 200px;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.chr-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chr-vehicle-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #667eea;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.chr-vehicle-details {
    padding: 20px;
}

.chr-vehicle-title {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 10px;
    color: #333;
}

.chr-vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.chr-vehicle-spec {
    background: #f5f5f5;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

.chr-vehicle-price {
    font-size: 1.4em;
    font-weight: 700;
    color: #667eea;
}

.chr-vehicle-price span {
    font-size: 0.6em;
    font-weight: 400;
    color: #999;
}

.chr-vehicle-actions {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

/* Booking Form Wizard */
.chr-booking-wizard {
    max-width: 900px;
    margin: 0 auto;
}

.chr-wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.chr-wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.chr-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.chr-step-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.chr-wizard-step.active .chr-step-number,
.chr-wizard-step.completed .chr-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.chr-wizard-step.completed .chr-step-number::after {
    content: '✓';
}

.chr-step-label {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.chr-wizard-step.active .chr-step-label {
    color: #667eea;
    font-weight: 600;
}

.chr-wizard-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.chr-wizard-panel {
    display: none;
}

.chr-wizard-panel.active {
    display: block;
}

.chr-wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Price Summary */
.chr-price-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.chr-price-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.chr-price-row:last-child {
    border-bottom: none;
}

.chr-price-row.chr-total {
    font-size: 1.2em;
    font-weight: 700;
    color: #667eea;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #667eea;
}

/* Customer Portal */
.chr-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.chr-portal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.chr-portal-header h2 {
    margin: 0;
    color: #fff;
}

.chr-portal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.chr-portal-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.chr-portal-tab:hover {
    background: #f5f5f5;
    color: #333;
}

.chr-portal-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.chr-portal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Stats Grid */
.chr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chr-stat-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.chr-stat-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: block;
}

.chr-stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #333;
    display: block;
    line-height: 1.2;
}

.chr-stat-label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Booking Confirmation */
.chr-confirmation {
    text-align: center;
    padding: 40px;
}

.chr-confirmation-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 40px;
    color: #fff;
}

.chr-confirmation h2 {
    color: #28a745;
    margin-bottom: 10px;
}

.chr-booking-ref-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 2px;
}

.chr-confirmation-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.chr-confirmation-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.chr-confirmation-row:last-child {
    border-bottom: none;
}

/* Login/Register Forms */
.chr-auth-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 0 20px;
}

.chr-auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chr-auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.chr-auth-header h2 {
    margin: 0;
    color: #fff;
}

.chr-auth-body {
    padding: 30px;
}

.chr-auth-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #eee;
}

.chr-auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.chr-auth-divider::before,
.chr-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.chr-auth-divider span {
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* Empty State */
.chr-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.chr-empty-icon {
    font-size: 4em;
    color: #ddd;
    margin-bottom: 20px;
}

.chr-empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

.chr-empty-state p {
    color: #999;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .chr-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .chr-wizard-steps::before {
        display: none;
    }
    
    .chr-wizard-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .chr-wizard-step {
        flex-direction: row;
        gap: 15px;
    }
    
    .chr-step-number {
        margin-bottom: 0;
    }
    
    .chr-vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .chr-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chr-portal-tabs {
        flex-direction: column;
    }
    
    .chr-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .chr-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chr-wizard-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .chr-wizard-nav .chr-btn {
        width: 100%;
    }
}
