/* Atkinson Booking — Public Styles */
.atkinson-booking-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

.atkinson-booking-wrap * {
    box-sizing: border-box;
}

.atkinson-booking-header {
    text-align: center;
    margin-bottom: 32px;
}

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

.atkinson-booking-header p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* Address Step (Step 1) */
.atkinson-address-step {
    animation: atkinsonFadeIn 0.3s ease;
}

.atkinson-address-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.atkinson-address-card .atkinson-form-title {
    text-align: center;
    margin-bottom: 16px;
}

.atkinson-address-card .atkinson-form-group {
    text-align: left;
    max-width: 480px;
    margin: 0 auto 16px auto;
}

.atkinson-address-card .atkinson-submit-btn {
    max-width: 480px;
    margin: 0 auto;
}

.atkinson-address-hint {
    color: #999;
    font-size: 13px;
    margin: 16px 0 0 0;
    line-height: 1.4;
}

/* Address validation */
.atkinson-address-validation {
    color: #c62828;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

.atkinson-input-error {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.15) !important;
}

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

/* Location note (fallback when geocoding fails) */
.atkinson-location-note {
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #7a6200;
    margin-bottom: 16px;
    text-align: center;
}

/* ============================
   Weekly Calendar View (Step 2)
   ============================ */

/* Week navigation */
.atkinson-week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.atkinson-week-label {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.atkinson-week-btn {
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.atkinson-week-btn:hover:not(:disabled) {
    border-color: #4a7c3f;
    color: #4a7c3f;
    background: #f8fdf6;
}

.atkinson-week-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 5-column grid (Mon–Fri) */
.atkinson-week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    animation: atkinsonFadeIn 0.3s ease;
}

.atkinson-week-col {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.atkinson-week-col.atkinson-week-today {
    border-color: #4a7c3f;
    background: #f8fdf6;
}

.atkinson-week-day-header {
    text-align: center;
    padding: 10px 6px 8px 6px;
    border-bottom: 1px solid #e8e8e8;
}

.atkinson-week-today .atkinson-week-day-header {
    border-bottom-color: #c8e0c2;
}

.atkinson-week-day-name {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

.atkinson-week-today .atkinson-week-day-name {
    color: #4a7c3f;
}

.atkinson-week-day-date {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-top: 2px;
}

.atkinson-week-day-body {
    padding: 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Legacy empty state (replaced by booked badge) */
.atkinson-week-empty {
    text-align: center;
    color: #ccc;
    font-size: 14px;
    padding: 16px 0;
}

/* Booked day column */
.atkinson-week-col-booked {
    background: #f5f5f5;
    opacity: 0.75;
}

.atkinson-week-col-booked .atkinson-week-day-header {
    color: #aaa;
}

.atkinson-week-booked {
    text-align: center;
    padding: 20px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.atkinson-booked-badge {
    display: inline-block;
    background: #eee;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Full-week no-availability helper */
.atkinson-week-full-msg {
    text-align: center;
    padding: 14px 20px;
    margin-top: 12px;
    background: #f8fdf6;
    border: 1px solid #d5e8d0;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* Slot buttons inside calendar */
.atkinson-week-slot {
    display: block;
    width: 100%;
    padding: 8px 6px;
    background: #e8f5e3;
    border: 2px solid transparent;
    border-left: 3px solid #4a7c3f;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    font-family: inherit;
}

.atkinson-week-slot:hover {
    background: #d5eed0;
    border-color: #4a7c3f;
    transform: scale(1.02);
}

.atkinson-week-slot.selected {
    background: #4a7c3f;
    color: #fff;
    border-color: #3d6834;
    border-left-color: #2e5526;
}
.atkinson-week-slot.selected .atkinson-slot-preferred-label {
    color: rgba(255, 255, 255, 0.75);
}

/* Preferred slot label */
.atkinson-slot-time {
    display: block;
}
.atkinson-slot-preferred-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #4a7c3f;
    margin-top: 1px;
    letter-spacing: 0.02em;
}

/* Booking Form (Step 3) */
.atkinson-booking-form-wrap {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 28px;
    margin-top: 24px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    animation: atkinsonSlideDown 0.3s ease;
}

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

.atkinson-booking-form-wrap.visible {
    display: block;
}

.atkinson-form-title {
    font-size: 18px;
    font-weight: 700;
    color: #4a7c3f;
    margin: 0 0 6px 0;
}

.atkinson-form-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
}

.atkinson-form-group {
    margin-bottom: 16px;
}

.atkinson-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #444;
    margin-bottom: 5px;
}

.atkinson-form-group label .required {
    color: #d63638;
}

.atkinson-form-group input,
.atkinson-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.atkinson-form-group input:focus,
.atkinson-form-group textarea:focus {
    border-color: #4a7c3f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 124, 63, 0.15);
    background: #fff;
}

.atkinson-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.atkinson-address-locked {
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.atkinson-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4a7c3f;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    justify-content: center;
    font-family: inherit;
}

.atkinson-submit-btn:hover {
    background: #3d6834;
}

.atkinson-submit-btn:active {
    transform: scale(0.98);
}

.atkinson-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* ============================
   Confirmation Step (Step 4)
   ============================ */
.atkinson-confirm-step {
    animation: atkinsonSlideDown 0.3s ease;
}

.atkinson-confirm-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 28px;
    margin-top: 24px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.atkinson-confirm-details {
    margin: 16px 0 24px 0;
}

.atkinson-confirm-row {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    line-height: 1.5;
}

.atkinson-confirm-row:last-child {
    border-bottom: none;
}

.atkinson-confirm-row strong {
    color: #444;
    display: inline-block;
    min-width: 110px;
}

.atkinson-confirm-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.atkinson-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #555;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.atkinson-btn-secondary:hover {
    border-color: #4a7c3f;
    color: #4a7c3f;
    background: #f8fdf6;
}

.atkinson-confirm-actions .atkinson-submit-btn {
    flex: 1;
}

/* Success Confirmation */
.atkinson-confirmation {
    text-align: center;
    background: #f0f7ee;
    border: 2px solid #4a7c3f;
    border-radius: 12px;
    padding: 32px;
    margin-top: 24px;
}

.atkinson-confirmation-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.atkinson-confirmation h3 {
    color: #4a7c3f;
    font-size: 22px;
    margin: 0 0 12px 0;
}

.atkinson-confirmation p {
    color: #555;
    font-size: 15px;
    margin: 0 0 6px 0;
    line-height: 1.6;
}

/* Add to Calendar buttons */
.atkinson-cal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.atkinson-cal-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    cursor: pointer;
}

.atkinson-cal-btn:active {
    transform: scale(0.97);
}

.atkinson-cal-btn-google {
    background: #fff;
    color: #333;
    border: 1px solid #d0d0d0;
}

.atkinson-cal-btn-google:hover {
    background: #f8fdf6;
    border-color: #4a7c3f;
    color: #4a7c3f;
}

.atkinson-cal-btn-ics {
    background: #4a7c3f;
    color: #fff;
    border: 1px solid #4a7c3f;
}

.atkinson-cal-btn-ics:hover {
    background: #3d6834;
}

/* Error */
.atkinson-error {
    background: #fce4e4;
    border: 1px solid #d63638;
    border-radius: 8px;
    padding: 12px 16px;
    color: #c62828;
    font-size: 14px;
    margin-bottom: 16px;
}

/* No slots */
.atkinson-no-slots {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 15px;
}

/* Calendar loading state — shown instantly after address submission
   while the slot AJAX runs in the background. Gives immediate visual
   feedback so the wait feels short even on cold cache. */
.atkinson-calendar-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: #666;
    font-size: 15px;
    gap: 16px;
}
.atkinson-calendar-loader p {
    margin: 0;
    font-weight: 500;
}
.atkinson-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e8e8e8;
    border-top-color: #4a7c3f;
    border-radius: 50%;
    animation: atkinsonSpin 0.7s linear infinite;
}

/* Loading spinner */
.atkinson-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: atkinsonSpin 0.7s linear infinite;
}

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

/* ============================
   Mobile Responsive
   ============================ */
@media (max-width: 640px) {
    .atkinson-booking-wrap {
        padding: 12px;
    }

    /* Stack weekly calendar into 2-column on small screens */
    .atkinson-week-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .atkinson-week-col {
        min-height: 100px;
    }

    .atkinson-week-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .atkinson-week-label {
        width: 100%;
        text-align: center;
        order: -1;
    }

    .atkinson-booking-form-wrap {
        padding: 20px;
    }

    .atkinson-address-card {
        padding: 20px;
    }

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

    .atkinson-confirm-actions {
        flex-direction: column;
    }

    .atkinson-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .atkinson-confirm-row strong {
        display: block;
        min-width: auto;
        margin-bottom: 2px;
    }
}

@media (max-width: 400px) {
    .atkinson-week-grid {
        grid-template-columns: 1fr;
    }
}
