/**
 * Altius Scheduler - Frontend Styles
 * 
 * Copyright © 2025-2026 Christine Ely and Altius Central. All Rights Reserved.
 * 
 * This file is part of Altius Scheduler, a proprietary WordPress plugin.
 * Unauthorized copying, distribution, or modification is strictly prohibited.
 * 
 * THEME ISOLATION: All styles use the .abs-booking-wrapper scope with explicit
 * color, background, and typography declarations to prevent WordPress theme 
 * interference. This ensures readability on any theme regardless of background.
 * 
 * @package    Altius Scheduler
 * @author     Christine Ely / Altius Central
 * @copyright  2025-2026 Christine Ely and Altius Central
 * @license    Proprietary
 * @version    3.10.0
 */

/* ============================================================
   THEME ISOLATION RESET
   Forces a clean white-background context for the entire widget.
   All selectors scoped to .abs-booking-wrapper with !important 
   to override theme styles without affecting the rest of the page.
   ============================================================ */
.abs-booking-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333333 !important;
    background-color: #ffffff !important;
    line-height: 1.6;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
}

.abs-booking-wrapper *,
.abs-booking-wrapper *::before,
.abs-booking-wrapper *::after {
    box-sizing: border-box;
}

.abs-booking-wrapper p,
.abs-booking-wrapper span,
.abs-booking-wrapper label,
.abs-booking-wrapper div,
.abs-booking-wrapper li,
.abs-booking-wrapper td,
.abs-booking-wrapper th,
.abs-booking-wrapper small {
    color: inherit;
}

/* ============================================================
   STEPS
   ============================================================ */
.abs-booking-wrapper .abs-step {
    display: none;
    animation: absSchedulerFadeIn 0.3s ease-in;
}

.abs-booking-wrapper .abs-step-active {
    display: block;
}

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

.abs-booking-wrapper .abs-step h2 {
    color: #222222 !important;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

/* ============================================================
   BACK BUTTON
   ============================================================ */
.abs-booking-wrapper .abs-back-btn {
    background: none;
    border: none;
    color: #0073aa !important;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    margin-bottom: 15px;
    text-decoration: none;
}

.abs-booking-wrapper .abs-back-btn:hover {
    color: #005177 !important;
    text-decoration: underline;
}

/* ============================================================
   STAFF SELECTION
   ============================================================ */
.abs-booking-wrapper .abs-staff-selection {
    text-align: center;
    padding: 40px 20px;
}

.abs-booking-wrapper .abs-select {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #cccccc;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #333333 !important;
    background-color: #ffffff !important;
}

.abs-booking-wrapper .abs-select option {
    color: #333333 !important;
    background-color: #ffffff !important;
}

.abs-booking-wrapper .abs-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.abs-booking-wrapper .abs-button {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
    font-weight: 600;
}

.abs-booking-wrapper .abs-button-primary {
    background-color: #0073aa !important;
    color: #ffffff !important;
}

.abs-booking-wrapper .abs-button-primary:hover:not(:disabled) {
    background-color: #005177 !important;
    color: #ffffff !important;
}

.abs-booking-wrapper .abs-button-primary:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
}

.abs-booking-wrapper .abs-button-large {
    width: 100%;
    padding: 15px;
    font-size: 18px;
}

/* ============================================================
   CALENDAR
   ============================================================ */
.abs-booking-wrapper .abs-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.abs-booking-wrapper .abs-calendar-header h3 {
    margin: 0;
    font-size: 20px;
    color: #222222 !important;
    font-weight: 700;
}

.abs-booking-wrapper .abs-calendar-nav {
    background: #0073aa !important;
    color: #ffffff !important;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abs-booking-wrapper .abs-calendar-nav:hover {
    background: #005177 !important;
}

.abs-booking-wrapper #abs-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

/* Day-of-week headers (Sun, Mon, etc.) */
.abs-booking-wrapper .abs-calendar-day-header {
    text-align: center;
    font-weight: 700;
    padding: 10px;
    background: #f0f0f0 !important;
    color: #333333 !important;
    font-size: 14px;
    border-radius: 4px;
}

/* Calendar day cells */
.abs-booking-wrapper .abs-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dddddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    color: #222222 !important;
    background-color: #ffffff !important;
}

.abs-booking-wrapper .abs-calendar-day:hover:not(.abs-day-disabled):not(.abs-day-past):not(.abs-day-empty) {
    background: #e6f2ff !important;
    border-color: #0073aa;
    color: #0073aa !important;
}

.abs-booking-wrapper .abs-calendar-day.abs-day-disabled,
.abs-booking-wrapper .abs-calendar-day.abs-day-past {
    color: #aaaaaa !important;
    cursor: not-allowed;
    background: #f7f7f7 !important;
    border-color: #e0e0e0;
}

.abs-booking-wrapper .abs-calendar-day.abs-day-empty {
    border: none;
    cursor: default;
    background: transparent !important;
}

.abs-booking-wrapper .abs-calendar-day.abs-day-selected {
    background: #0073aa !important;
    color: #ffffff !important;
    border-color: #005177;
}

/* ============================================================
   SERVICE SELECTOR (Step 3)
   ============================================================ */
.abs-booking-wrapper .abs-service-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa !important;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.abs-booking-wrapper .abs-service-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333 !important;
}

.abs-booking-wrapper #abs-service-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #555555 !important;
}

/* ============================================================
   TIME SLOTS
   ============================================================ */
.abs-booking-wrapper #abs-selected-date-display {
    font-size: 18px;
    color: #555555 !important;
    margin-bottom: 20px;
}

.abs-booking-wrapper #abs-time-slots-container {
    padding: 10px;
}

.abs-booking-wrapper .abs-time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.abs-booking-wrapper .abs-time-instruction {
    grid-column: 1 / -1;
    color: #555555 !important;
}

/* Base time slot */
.abs-booking-wrapper .abs-time-slot {
    padding: 15px;
    background: #ffffff !important;
    border: 2px solid #dddddd;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    color: #333333 !important;
    font-size: 15px;
    font-weight: 500;
}

/* Available time slots — dark green text on light green bg */
.abs-booking-wrapper .abs-time-slot.abs-slot-available {
    background: #f0fff0 !important;
    border-color: #66bb6a !important;
    color: #1a5e1f !important;
    font-weight: 600;
}

.abs-booking-wrapper .abs-time-slot.abs-slot-available:hover {
    background: #d4f5d4 !important;
    border-color: #2e7d32 !important;
    color: #1a5e1f !important;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

/* Selected time slot */
.abs-booking-wrapper .abs-time-slot.abs-slot-selected {
    background: #2e7d32 !important;
    border-color: #1b5e20 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

/* Booked time slots */
.abs-booking-wrapper .abs-time-slot.abs-slot-booked {
    background: #f5f5f5 !important;
    color: #888888 !important;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: #e0e0e0;
}

/* Unavailable time slots */
.abs-booking-wrapper .abs-time-slot.abs-slot-unavailable {
    background: #fff5f5 !important;
    color: #b71c1c !important;
    cursor: not-allowed;
    border-color: #ef9a9a;
}

.abs-booking-wrapper .abs-time-slot.abs-slot-unavailable small {
    display: block;
    font-size: 10px;
    color: #c62828 !important;
}

/* Time slot wrapper label */
.abs-booking-wrapper #abs-time-slots-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333 !important;
}

/* ============================================================
   BOOKING SUMMARY
   ============================================================ */
.abs-booking-wrapper .abs-booking-summary {
    background: #f0f8ff !important;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #b3d9f2;
}

.abs-booking-wrapper .abs-booking-summary h3 {
    margin-top: 0;
    color: #0073aa !important;
    font-weight: 700;
}

.abs-booking-wrapper .abs-booking-summary p {
    margin: 8px 0;
    color: #333333 !important;
}

.abs-booking-wrapper .abs-booking-summary strong {
    color: #222222 !important;
}

/* ============================================================
   FORM
   ============================================================ */
.abs-booking-wrapper .abs-form-group {
    margin-bottom: 20px;
}

.abs-booking-wrapper .abs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333 !important;
}

.abs-booking-wrapper .abs-form-group input,
.abs-booking-wrapper .abs-form-group select,
.abs-booking-wrapper .abs-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #cccccc;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    color: #333333 !important;
    background-color: #ffffff !important;
}

.abs-booking-wrapper .abs-form-group input::placeholder,
.abs-booking-wrapper .abs-form-group textarea::placeholder {
    color: #999999 !important;
}

.abs-booking-wrapper .abs-form-group input:focus,
.abs-booking-wrapper .abs-form-group select:focus,
.abs-booking-wrapper .abs-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.abs-booking-wrapper .abs-field-description {
    font-size: 12px;
    color: #666666 !important;
    margin-top: 5px;
}

/* ============================================================
   MESSAGES
   ============================================================ */
.abs-booking-wrapper .abs-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.abs-booking-wrapper .abs-message.abs-error {
    background: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ef5350;
}

.abs-booking-wrapper .abs-message.abs-success {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #66bb6a;
}

/* ============================================================
   SUCCESS STEP
   ============================================================ */
.abs-booking-wrapper .abs-success-step {
    text-align: center;
    padding: 60px 20px;
}

.abs-booking-wrapper .abs-success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50 !important;
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 30px;
}

.abs-booking-wrapper .abs-success-step h2 {
    color: #4caf50 !important;
}

.abs-booking-wrapper .abs-success-step p {
    color: #333333 !important;
}

.abs-booking-wrapper .abs-success-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.abs-booking-wrapper .abs-button-success {
    background-color: #10b981 !important;
    color: #ffffff !important;
    text-decoration: none;
    display: inline-block;
}

.abs-booking-wrapper .abs-button-success:hover {
    background-color: #059669 !important;
    color: #ffffff !important;
    text-decoration: none;
}

/* ============================================================
   NOTICE
   ============================================================ */
.abs-booking-wrapper .abs-notice {
    background: #fff3cd !important;
    border: 1px solid #ffc107;
    color: #856404 !important;
    padding: 15px;
    border-radius: 6px;
}

.abs-booking-wrapper .abs-notice-info {
    background: #fff9e6 !important;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #6b5300 !important;
}

.abs-booking-wrapper .abs-notice-info strong {
    color: #6b5300 !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .abs-booking-wrapper {
        padding: 15px;
    }
    
    .abs-booking-wrapper .abs-time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .abs-booking-wrapper .abs-calendar-day {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .abs-booking-wrapper #abs-calendar-grid {
        gap: 3px;
    }
    
    .abs-booking-wrapper .abs-calendar-day-header {
        font-size: 12px;
        padding: 8px 4px;
    }
    
    .abs-booking-wrapper .abs-time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   RENTAL MODE STYLES
   ============================================================ */
.abs-booking-wrapper .abs-duration-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 20px auto;
}

.abs-booking-wrapper .abs-duration-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border: 3px solid #dddddd;
    border-radius: 10px;
    background: #ffffff !important;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333333 !important;
}

.abs-booking-wrapper .abs-duration-option:hover {
    border-color: #0073aa;
    background: #f0f8ff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

.abs-booking-wrapper .abs-duration-option.selected {
    border-color: #0073aa;
    background: #e6f2ff !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.abs-booking-wrapper .abs-duration-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5 !important;
}

.abs-booking-wrapper .abs-duration-option.disabled:hover {
    border-color: #dddddd;
    background: #f5f5f5 !important;
    transform: none;
    box-shadow: none;
}

.abs-booking-wrapper .abs-duration-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.abs-booking-wrapper .abs-duration-label strong {
    font-size: 18px;
    color: #222222 !important;
}

.abs-booking-wrapper .abs-duration-desc {
    font-size: 14px;
    color: #666666 !important;
}

.abs-booking-wrapper .abs-duration-price {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa !important;
}

.abs-booking-wrapper .abs-total-price {
    font-size: 20px;
    color: #0073aa !important;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #dddddd;
}

@media (max-width: 600px) {
    .abs-booking-wrapper .abs-duration-option {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .abs-booking-wrapper .abs-duration-label {
        align-items: center;
    }
}
