/* ==========================================
   Car Service Booking - Frontend Styles
   ========================================== */
* {
    box-sizing: border-box;
}

.csb-booking-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* ==========================================
   Step Progress Header
   ========================================== */
.csb-steps-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 0;
}

.csb-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
    white-space: nowrap;
}

.csb-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.csb-step-label {
    font-size: 14px;
    color: #888;
    font-weight: 500;
    transition: color 0.3s;
}

.csb-step-item.active .csb-step-number {
    background: #1a5fb4;
    color: #fff;
}

.csb-step-item.active .csb-step-label {
    color: #1a5fb4;
    font-weight: 600;
}

.csb-step-item.completed .csb-step-number {
    background: #2ecc71;
    color: #fff;
}

.csb-step-item.completed .csb-step-label {
    color: #333;
}

.csb-step-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    min-width: 20px;
    margin: 0 5px;
}

/* ==========================================
   Form Elements
   ========================================== */
.csb-step {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

.csb-step-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #222;
}

.csb-subtitle {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.csb-form-group {
    margin-bottom: 18px;
}

.csb-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.csb-required {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

.csb-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.csb-input:focus {
    border-color: #1a5fb4;
    box-shadow: 0 0 0 2px rgba(26, 95, 180, 0.15);
}

.csb-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.csb-input-row .csb-input {
    flex: 1;
}

.csb-form-row {
    display: flex;
    gap: 15px;
}

.csb-half {
    flex: 1;
}

.csb-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.csb-textarea:focus {
    border-color: #1a5fb4;
    box-shadow: 0 0 0 2px rgba(26, 95, 180, 0.15);
}

/* ==========================================
   Buttons
   ========================================== */
.csb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.csb-btn-primary {
    background: #1a5fb4;
    color: #fff;
}

.csb-btn-primary:hover {
    background: #164d94;
}

.csb-btn-primary:disabled {
    background: #8ab4e8;
    cursor: not-allowed;
}

.csb-btn-outline {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.csb-btn-outline:hover {
    background: #f5f5f5;
}

.csb-btn-cancel {
    color: #c0392b;
    border-color: #c0392b;
}

.csb-btn-cancel:hover {
    background: #fdf0ef;
}

.csb-btn-danger {
    background: #c0392b;
    color: #fff;
}

.csb-btn-danger:hover {
    background: #a93226;
}

.csb-btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* ==========================================
   Car Info Table
   ========================================== */
.csb-car-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.csb-car-table th,
.csb-car-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.csb-car-table th {
    color: #666;
    font-weight: 500;
    width: 40%;
    background: #fafafa;
}

.csb-car-table td {
    font-weight: 600;
    color: #222;
}

/* ==========================================
   Services Grid
   ========================================== */
.csb-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.csb-service-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 10px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
    min-height: 90px;
}

.csb-service-btn:hover {
    border-color: #1a5fb4;
    background: #f0f4ff;
}

.csb-service-btn.selected {
    border-color: #1a5fb4;
    background: #1a5fb4;
    color: #fff;
}

.csb-service-icon {
    font-size: 24px;
    line-height: 1;
}

.csb-service-btn span:last-child {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* ==========================================
   Service Popup Modal
   ========================================== */
.csb-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csb-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.csb-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
    overflow: hidden;
}

.csb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}

.csb-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.csb-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.csb-modal-close:hover {
    color: #333;
}

.csb-modal-body {
    padding: 20px 24px;
}

.csb-modal-body p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 14px;
}

.csb-modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 24px;
    border-top: 1px solid #eee;
}

/* ==========================================
   Calendar / Time Slots
   ========================================== */
.csb-calendar-wrapper {
    margin-top: 10px;
}

.csb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.csb-calendar-header span {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.csb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.csb-calendar-day {
    text-align: center;
    padding: 12px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.csb-calendar-day-name {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.csb-calendar-day-num {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.csb-calendar-day-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 auto;
}

.csb-calendar-day.available {
    background: #f0fff4;
}

.csb-calendar-day.available .csb-calendar-day-dot {
    background: #2ecc71;
}

.csb-calendar-day.available:hover {
    border-color: #2ecc71;
    background: #d4edda;
}

.csb-calendar-day.full {
    background: #fff5f5;
    cursor: not-allowed;
}

.csb-calendar-day.full .csb-calendar-day-dot {
    background: #e74c3c;
}

.csb-calendar-day.closed {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.csb-calendar-day.closed .csb-calendar-day-dot {
    background: #bbb;
}

.csb-calendar-day.past {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.4;
}

.csb-calendar-day.past .csb-calendar-day-dot {
    background: #ccc;
}

.csb-calendar-day.selected-day {
    border-color: #1a5fb4;
    background: #e8f0fe;
}

.csb-calendar-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.csb-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.csb-dot-green { background: #2ecc71; }
.csb-dot-red { background: #e74c3c; }
.csb-dot-gray { background: #bbb; }

/* Time Slots */
.csb-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.csb-time-slot {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    background: #fff;
}

.csb-time-slot:hover {
    border-color: #1a5fb4;
    background: #f0f4ff;
}

.csb-time-slot.selected {
    border-color: #1a5fb4;
    background: #1a5fb4;
    color: #fff;
}

.csb-time-slot.taken {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
    border-color: #eee;
    text-decoration: line-through;
}

/* ==========================================
   Summary
   ========================================== */
.csb-summary {
    line-height: 1.6;
}

.csb-summary-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.csb-summary-section:last-child {
    border-bottom: none;
}

.csb-summary-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a5fb4;
    margin: 0 0 10px 0;
}

.csb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.csb-summary-label {
    color: #666;
    flex: 0 0 40%;
}

.csb-summary-value {
    color: #222;
    font-weight: 600;
    flex: 0 0 58%;
    text-align: right;
}

/* ==========================================
   Confirmation
   ========================================== */
.csb-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.csb-confirm-icon {
    width: 70px;
    height: 70px;
    background: #2ecc71;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
}

.csb-confirmation h2 {
    font-size: 26px;
    margin: 0 0 10px 0;
    color: #222;
}

.csb-confirmation p {
    font-size: 15px;
    color: #555;
    max-width: 500px;
    margin: 0 auto 20px;
}

#csb-confirm-details {
    display: inline-block;
    text-align: left;
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.8;
}

/* ==========================================
   Navigation
   ========================================== */
.csb-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
}

.csb-nav .csb-btn-cancel {
    margin-right: auto;
}

/* ==========================================
   Messages
   ========================================== */
.csb-error-msg {
    color: #c0392b;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fdf0ef;
    border-radius: 6px;
    border-left: 3px solid #c0392b;
}

.csb-info-msg {
    color: #856404;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px 14px;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

.csb-loading {
    text-align: center;
    padding: 20px;
    color: #888;
}

.csb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #1a5fb4;
    border-radius: 50%;
    animation: csb-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes csb-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    .csb-booking-wrapper {
        padding: 10px;
    }

    .csb-step {
        padding: 20px 15px;
    }

    .csb-steps-header {
        padding: 15px 8px;
        gap: 4px;
    }

    .csb-step-label {
        display: none;
    }

    .csb-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .csb-step-line {
        min-width: 15px;
    }

    .csb-form-row {
        flex-direction: column;
        gap: 0;
    }

    .csb-input-row {
        flex-direction: column;
    }

    .csb-services-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .csb-service-btn {
        padding: 14px 8px;
        min-height: 80px;
    }

    .csb-calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }

    .csb-calendar-day {
        padding: 8px 3px;
    }

    .csb-calendar-day-name {
        font-size: 9px;
    }

    .csb-calendar-day-num {
        font-size: 14px;
    }

    .csb-time-slots {
        gap: 8px;
    }

    .csb-time-slot {
        padding: 8px 14px;
        font-size: 13px;
    }

    .csb-summary-row {
        flex-direction: column;
        gap: 2px;
    }

    .csb-summary-value {
        text-align: left;
    }

    .csb-nav {
        flex-wrap: wrap;
    }

    .csb-modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .csb-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .csb-calendar-grid {
        gap: 2px;
    }

    .csb-calendar-day {
        padding: 6px 2px;
    }

    .csb-calendar-day-num {
        font-size: 12px;
    }

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


.csb-status-pending {
    color: orange;
    font-weight: bold;
}

.csb-status-cancelled {
    color: red;
    font-weight: bold;
}

.csb-status-completed {
    color: green;
    font-weight: bold;
}

.csb-status-deleted {
    color: gray;
    font-weight: bold;
}
