/**
 * RACC Booking — Frontend Booking Form Styles
 *
 * @package RACC_Booking
 */

/* === Wrapper === */
.racc-booking-wrapper {
    max-width: 720px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1e293b;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 40px;
    line-height: 1.6;
}

/* === Header === */
.racc-booking-header {
    text-align: center;
    margin-bottom: 30px;
}

.racc-booking-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.racc-booking-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* === Progress Steps === */
.racc-booking-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 35px;
    padding: 0 10px;
}

.racc-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.racc-step.active {
    opacity: 1;
}

.racc-step.completed {
    opacity: 0.8;
}

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

.racc-step.active .racc-step-number {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.racc-step.completed .racc-step-number {
    background: #10b981;
    color: #fff;
}

.racc-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.racc-step.active .racc-step-label {
    color: #2563eb;
}

.racc-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 12px;
    min-width: 20px;
    max-width: 50px;
}

/* === Step Content === */
.racc-booking-step-content {
    min-height: 200px;
    animation: raccFadeIn 0.3s ease;
}

@keyframes raccFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.racc-booking-step-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.racc-icon {
    font-style: normal;
    font-size: 20px;
}

/* === Agents Grid === */
.racc-agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.racc-agent-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.racc-agent-card:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.racc-agent-card.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.racc-agent-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 12px;
}

.racc-agent-card .racc-agent-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}

.racc-agent-card .racc-agent-email {
    font-size: 12px;
    color: #94a3b8;
    word-break: break-all;
}

/* === Date & Time === */
.racc-datetime-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.racc-date-picker-wrap label,
.racc-availability-wrap label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

#racc-date-picker {
    width: 100%;
    max-width: 300px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
}

#racc-date-picker:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* === Time Slots === */
.racc-time-slots label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
}

.racc-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.racc-slot-btn {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid #2563eb;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.racc-slot-btn:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.racc-slot-btn.selected {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.racc-no-slots {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 14px;
}

/* === Services === */
.racc-services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.racc-service-option {
    cursor: pointer;
    display: block;
}

.racc-service-option input[type="radio"] {
    display: none;
}

.racc-service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.racc-service-option:hover .racc-service-card {
    border-color: #2563eb;
    background: #eff6ff;
}

.racc-service-option input:checked + .racc-service-card {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.racc-service-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
}

.racc-service-option input:checked + .racc-service-card .racc-service-number {
    background: #2563eb;
    color: #fff;
}

.racc-service-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* === Form Fields === */
.racc-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.racc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.racc-form-full {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .racc-form-row {
        grid-template-columns: 1fr;
    }
}

.racc-form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.racc-form-section-title:first-child {
    margin-top: 0;
}

.racc-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.racc-form-group label .required {
    color: #dc2626;
}

.racc-form-group input,
.racc-form-group textarea,
.racc-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.racc-form-group input:focus,
.racc-form-group textarea:focus,
.racc-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.racc-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.racc-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.racc-field-note {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-style: italic;
}

/* === Booking Summary === */
.racc-booking-summary {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.racc-booking-summary h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #0c4a6e;
}

.racc-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.racc-summary-item {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.racc-summary-label {
    color: #64748b;
    min-width: 110px;
    font-weight: 500;
}

.racc-summary-value {
    color: #0f172a;
    font-weight: 600;
}

/* === Navigation Buttons === */
.racc-booking-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

/* === Buttons === */
.racc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
}

.racc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.racc-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.racc-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.racc-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

.racc-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.racc-btn-outline {
    background: transparent;
    color: #64748b;
    border-color: #e2e8f0;
}

.racc-btn-outline:hover:not(:disabled) {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.racc-btn-success {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.racc-btn-success:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* === Messages === */
.racc-booking-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.racc-booking-message.racc-msg-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.racc-booking-message.racc-msg-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* === Loading Spinner === */
.racc-loading {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
}

.racc-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: raccSpin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes raccSpin {
    to { transform: rotate(360deg); }
}

/* === Responsive === */
@media (max-width: 600px) {
    .racc-booking-wrapper {
        margin: 20px 10px;
        padding: 24px 20px;
        border-radius: 12px;
    }

    .racc-booking-header h2 {
        font-size: 22px;
    }

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

    .racc-booking-steps {
        gap: 0;
    }

    .racc-agents-grid {
        grid-template-columns: 1fr;
    }

    .racc-booking-nav {
        flex-direction: column;
        gap: 10px;
    }

    .racc-booking-nav .racc-btn {
        width: 100%;
    }
}
