/* Frontend stylesheet for the Appointment Booking plugin (Multi-step Wizard) */

.ab-booking-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333333;
    transition: all 0.3s ease;
}

.ab-form-group {
    margin-bottom: 1.8rem;
}

.ab-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #222222;
}

.ab-required {
    color: #e74c3c;
}

.ab-select-wrapper {
    position: relative;
    width: 100%;
}

.ab-select,
.ab-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333333;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ab-select:focus,
.ab-input:focus {
    border-color: var(--ab-btn-bg);
    box-shadow: 0 0 0 3px rgba(207, 174, 130, 0.15);
}

.ab-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Calendar Styles */
.ab-calendar-container {
    margin-top: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.ab-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.ab-calendar-month-year {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
}

.ab-calendar-prev,
.ab-calendar-next {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    color: #475569;
    border-radius: 6px;
    transition: background 0.2s;
}

.ab-calendar-prev:hover,
.ab-calendar-next:hover {
    background: #f1f5f9;
}

.ab-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f1f5f9;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    padding: 0.6rem 0;
}

.ab-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0.5rem;
    background: #ffffff;
}

.ab-day {
    aspect-ratio: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--ab-cal-text);
    border-radius: 6px;
    margin: 2px;
    transition: background-color 0.2s, color 0.2s;
}

.ab-day:hover:not(.ab-day-disabled) {
    background-color: #f1f5f9;
}

.ab-day-selected {
    background-color: var(--ab-cal-accent) !important;
    color: #ffffff !important;
    font-weight: bold;
}

.ab-day-disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background-color: #f8fafc;
}

/* Date Display */
.ab-selected-date-display {
    text-align: center;
    margin: 1.2rem 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: #475569;
}

/* Time Slots Grid */
.ab-slots-container {
    margin-top: 1rem;
}

.ab-slots-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 2rem 0;
    color: var(--ab-btn-bg);
    font-weight: 500;
}

.ab-slots-loading::before {
    content: "";
    width: 24px;
    height: 24px;
    border: 3px solid rgba(207, 174, 130, 0.2);
    border-top-color: var(--ab-btn-bg);
    border-radius: 50%;
    animation: ab-spin 0.8s linear infinite;
}

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

.ab-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ab-slot {
    padding: 0.8rem 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--ab-slot-border);
    border-radius: 6px;
    background-color: var(--ab-slot-bg);
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.ab-slot:hover:not(.ab-slot-booked) {
    background-color: rgba(207, 174, 130, 0.08);
    border-color: var(--ab-slot-active);
}

.ab-slot-selected {
    background-color: var(--ab-slot-active) !important;
    color: #ffffff !important;
    border-color: var(--ab-slot-active) !important;
}

.ab-slot-booked {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #cbd5e1;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Checkbox Consent & Form Checkboxes */
.ab-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ab-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    color: #475569;
    user-select: none;
}

.ab-checkbox-label input {
    margin-top: 0.25rem;
    margin-right: 0.7rem;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Multi-step Wizard Navigation Buttons */
.ab-step-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 2.5rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.5rem;
}

.ab-next-button,
.ab-submit-button {
    background-color: var(--ab-btn-bg);
    color: var(--ab-btn-text);
    border: none;
    padding: 0.9rem 2.8rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(207, 174, 130, 0.3);
    transition: all 0.3s;
}

.ab-next-button:hover:not(:disabled),
.ab-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(207, 174, 130, 0.4);
    opacity: 0.95;
}

.ab-next-button:disabled,
.ab-submit-button:disabled {
    background-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ab-back-button {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 0.9rem 2.8rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.ab-back-button:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* Wizard Animations */
.ab-step {
    animation: fadeIn 0.4s ease-in-out forwards;
}

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

/* Messages and Errors */
.ab-message-container {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.ab-message-success {
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.ab-message-error {
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.ab-input-error {
    border-color: #ef4444 !important;
    background-color: #fffafb;
}

.ab-error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .ab-booking-container {
        padding: 1.5rem;
    }
    
    .ab-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ab-day {
        aspect-ratio: 1;
    }

    .ab-step-navigation {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .ab-next-button,
    .ab-back-button,
    .ab-submit-button {
        width: 100%;
        padding: 0.8rem 0;
    }
}
