/**
 * AEU Booking System - Public Styles
 * 
 * Frontend styles for booking forms, calendars, and widgets
 * Corporate AEU branding with modern design
 * 
 * INCLUDES: Secure challenge system styles
 */

/* SECURE Challenge Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*
 * @package AEU_Booking
 * @version 1.0.0
 */

/* ==========================================================================
   CSS Variables & Root Styles
   ========================================================================== */

:root {
    --aeu-primary: #2f3a3f;
    --aeu-secondary: #ff8300;
    --aeu-accent: #ffc300;
    --aeu-success: #28a745;
    --aeu-error: #dc3545;
    --aeu-warning: #ffc107;
    --aeu-info: #17a2b8;
    
    --aeu-bg-light: #f8f9fa;
    --aeu-bg-white: #ffffff;
    --aeu-border: #dee2e6;
    --aeu-border-light: #e9ecef;
    --aeu-text: #333333;
    --aeu-text-muted: #6c757d;
    --aeu-text-light: #868e96;
    
    --aeu-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --aeu-shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --aeu-radius: 6px;
    --aeu-radius-lg: 12px;
    
    --aeu-transition: all 0.3s ease;
    --aeu-font-size: 16px;
    --aeu-line-height: 1.5;
}

/* ==========================================================================
   Base Booking Form Styles
   ========================================================================== */

.aeu-booking-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--aeu-bg-white);
    box-shadow: var(--aeu-shadow-lg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.aeu-booking-form * {
    box-sizing: border-box;
}

/* ==========================================================================
   Step Navigation & Progress
   ========================================================================== */

.booking-step {
    display: none;
    padding: 5px 0;
    animation: fadeIn 0.3s ease-in-out;
}

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

.step-title {
    color: var(--aeu-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-align: center;
}

.step-description {
    color: var(--aeu-text-muted);
    font-size: 16px;
    text-align: center;
    margin: 0 0 30px 0;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--aeu-border-light);
}

.step-navigation .btn-back {
    margin-right: auto;
}

.step-navigation .btn-next,
.step-navigation .btn-primary,
.step-navigation .btn-submit {
    margin-left: auto;
}

.step-navigation .btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--aeu-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--aeu-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: var(--aeu-bg-light);
    color: var(--aeu-text);
}

.btn-back:hover {
    background: var(--aeu-border);
}

.btn-next,
.btn-primary {
    background: var(--aeu-secondary);
    color: white;
}

.btn-next:hover,
.btn-primary:hover {
    background: #e67600;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading disabled state */
.loading-disabled {
    opacity: 0.6 !important;
    cursor: wait !important;
    pointer-events: none !important;
    position: relative;
}

.loading-disabled:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 131, 0, 0.2);
    border-top: 2px solid var(--aeu-secondary);
    border-radius: 50%;
    animation: aeu-spin 1s linear infinite;
    z-index: 10;
}

/* Don't show global loading spinner on calendar days - they have their own */
.calendar-day.loading-disabled:after {
    display: none;
}

@keyframes aeu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Service Selection Grid
   ========================================================================== */

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.service-option {
    cursor: pointer;
}

.service-card {
    background: var(--aeu-bg-white);
    border: 2px solid var(--aeu-border-light);
    border-radius: var(--aeu-radius);
    padding: 24px;
    transition: var(--aeu-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: var(--aeu-secondary);
    transform: translateY(-2px);
    box-shadow: var(--aeu-shadow);
}

.service-option.selected .service-card {
    border-color: var(--aeu-secondary);
    background: rgba(255, 131, 0, 0.05);
}

.service-name {
    color: var(--aeu-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.service-description {
    color: var(--aeu-text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
    flex-grow: 1;
    line-height: 1.4;
}

.service-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid var(--aeu-border-light);
}

.service-duration,
.service-price {
    font-size: 14px;
    font-weight: 500;
    color: var(--aeu-text);
}

.service-duration {
    color: var(--aeu-secondary);
    font-size: 14px;
    font-weight: 500;
}

.service-price {
    color: var(--aeu-success);
    font-weight: 600;
}

.select-service-btn {
    background: var(--aeu-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--aeu-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--aeu-transition);
    width: 100%;
    margin-top: auto;
}

.select-service-btn:hover {
    background: #1a2328;
}

/* ==========================================================================
   Consultant Selection Grid
   ========================================================================== */

.consultant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.consultant-option {
    cursor: pointer;
}

.consultant-card {
    background: var(--aeu-bg-white);
    border: 2px solid var(--aeu-border-light);
    border-radius: var(--aeu-radius);
    padding: 24px;
    text-align: center;
    transition: var(--aeu-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.consultant-card:hover {
    border-color: var(--aeu-secondary);
    transform: translateY(-2px);
    box-shadow: var(--aeu-shadow);
}

.consultant-option.selected .consultant-card {
    border-color: var(--aeu-secondary);
    background: rgba(255, 131, 0, 0.05);
}

.consultant-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--aeu-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    margin: 0 auto 16px auto;
}

.consultant-name {
    color: var(--aeu-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.consultant-title {
    color: var(--aeu-text-muted);
    font-size: 14px;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.consultant-bio {
    color: var(--aeu-text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.4;
    flex-grow: 1;
}

.consultant-availability {
    margin: 16px 0;
    padding: 8px 12px;
    background: var(--aeu-bg-light);
    border-radius: var(--aeu-radius);
    font-size: 12px;
}

.availability-indicator {
    color: var(--aeu-text-muted);
}

.availability-indicator.available {
    color: var(--aeu-success);
}

.availability-indicator.limited {
    color: var(--aeu-warning);
}

.availability-indicator.unavailable {
    color: var(--aeu-error);
}

.select-consultant-btn {
    background: var(--aeu-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--aeu-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--aeu-transition);
    width: 100%;
    margin-top: auto;
}

.select-consultant-btn:hover {
    background: #1a2328;
}

/* ==========================================================================
   Date & Time Selection
   ========================================================================== */

.datetime-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .datetime-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Calendar Styles */
.calendar-container {
    background: var(--aeu-bg-white);
    border: 1px solid var(--aeu-border-light);
    border-radius: var(--aeu-radius);
    padding: 20px;
}

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

.calendar-month-year {
    color: var(--aeu-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.calendar-nav {
    background: var(--aeu-bg-light);
    border: 1px solid var(--aeu-border);
    border-radius: var(--aeu-radius);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--aeu-transition);
    font-size: 16px;
    color: var(--aeu-text);
}

.calendar-nav:hover {
    background: var(--aeu-border);
}

.calendar-grid {
    width: 100%;
}

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

.calendar-weekdays > div {
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--aeu-text-muted);
    background: var(--aeu-bg-light);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--aeu-border-light);
    border-radius: var(--aeu-radius);
    cursor: pointer;
    transition: var(--aeu-transition);
    font-size: 14px;
    position: relative;
    margin: 2px;
}

.calendar-day:hover {
    border-color: var(--aeu-secondary);
}

.calendar-day.disabled,
.calendar-day.past {
    color: var(--aeu-text-light);
    cursor: not-allowed;
    background: var(--aeu-bg-light);
}

.calendar-day.other-month {
    color: var(--aeu-text-light);
    opacity: 0.5;
}

.calendar-day.available {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--aeu-success);
    cursor: pointer;
}

.calendar-day.available:hover {
    background: rgba(40, 167, 69, 0.2);
    transform: scale(1.05);
}

.calendar-day.limited-availability {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--aeu-warning);
}

.calendar-day.selected {
    background: var(--aeu-secondary);
    color: white;
    border-color: var(--aeu-secondary);
}

/* Slot count badge */
.calendar-day {
    position: relative;
}

.slot-count-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: var(--aeu-success);
  color: white;
  font-size: 8px;
  font-weight: bold;
  border-radius: 4px;
  min-width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
}

.calendar-day.limited-availability .slot-count-badge {
    background: var(--aeu-warning);
    color: var(--aeu-text-dark);
}

.calendar-day.today {
    font-weight: 600;
    border: 2px solid var(--aeu-primary);
}

.calendar-day.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}

.calendar-day .day-number {
    display: block;
}

.calendar-day .day-loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--aeu-secondary);
    border-radius: 50%;
    animation: aeu-calendar-spin 1s linear infinite;
}

.calendar-day.loading .day-loading-spinner {
    display: inline-block;
}

@keyframes aeu-calendar-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation disabled state */
.calendar-nav.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--aeu-bg-light);
}

.calendar-nav.disabled:hover {
    background: var(--aeu-bg-light);
}

/* Loading state for calendar container */
.calendar-container.loading {
    position: relative;
}

.calendar-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--aeu-radius);
}
.calendar-container.loading .calendar-loading-overlay {
    display: flex !important;
}

.calendar-loading-overlay .loading-spinner {
    text-align: center;
}

.calendar-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--aeu-border-light);
    border-top: 4px solid var(--aeu-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

.calendar-loading-overlay p {
    color: var(--aeu-text-muted);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* ==========================================================================
   Enhanced Calendar & Time Slots Interface
   ========================================================================== */

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--aeu-border-light);
}

/* Compact legend (icons only with tooltips) */
.calendar-legend.calendar-legend-compact {
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
}

.calendar-legend-compact .legend-item {
    position: relative;
    cursor: help;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.calendar-legend-compact .legend-item:hover {
    background-color: var(--aeu-bg-light);
}

/* Native tooltip styling via title attribute - enhanced with CSS for touch */
.calendar-legend-compact .legend-item::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--aeu-text-primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.calendar-legend-compact .legend-item:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Remove title attribute tooltip on touch devices (use custom tooltip) */
@media (hover: none) {
    .calendar-legend-compact .legend-item[title] {
        -webkit-touch-callout: none;
    }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--aeu-text-muted);
}

.legend-color {
    width: 50px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.available {
    background: rgba(40, 167, 69, 0.3);
    border: 1px solid var(--aeu-success);
}
.legend-color.limited-availability {
    background: rgba(255, 193, 7, 0.3);
    border: 1px solid var(--aeu-warning);
}

.legend-color.unavailable {
    background: var(--aeu-bg-light);
    border: 1px solid var(--aeu-border);
}

.legend-color.selected {
    background: var(--aeu-secondary);
}

/* Time Slots Container */
.time-slots-container {
    background: var(--aeu-bg-white);
    border: 1px solid var(--aeu-border-light);
    border-radius: var(--aeu-radius);
    padding: 20px;
    position: relative;
}

.time-slots-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--aeu-secondary);
    padding-bottom: 10px;
}

.time-slots-header h4 {
    color: var(--aeu-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.time-slots-instruction {
    color: var(--aeu-text-muted);
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

.timezone-info {
    margin: 8px 0 0 0;
}

.timezone-info small {
    color: var(--aeu-text-muted);
    font-size: 12px;
    font-style: italic;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 6px;
    overflow-y: auto;
    max-height: 280px;
}

/* Compact Time Slot Buttons */
.time-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border: 1px solid var(--aeu-border);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--aeu-transition);
    background: var(--aeu-bg-white);
    min-height: 36px;
    position: relative;
    margin-top: 5px;
}

.time-slot:hover {
    border-color: var(--aeu-secondary);
    background: rgba(255, 131, 0, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-slot.selected {
    background: var(--aeu-secondary);
    color: white;
    border-color: var(--aeu-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 131, 0, 0.4);
}

.time-slot.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--aeu-bg-light);
}

.slot-time {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.slot-duration {
    font-size: 10px;
    opacity: 0.7;
    font-weight: 400;
    display: none; /* Hide duration for compact view */
}

/* Select Date Message */
.select-date-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--aeu-text-muted);
    min-height: 200px;
}

.calendar-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.select-date-message h4 {
    color: var(--aeu-text);
    margin: 0 0 8px 0;
    font-size: 16px;
}

.select-date-message p {
    margin: 0;
    font-size: 14px;
}

/* No Slots Message */
.no-slots-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--aeu-text-muted);
    min-height: 200px;
}

.no-slots-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-slots-message h4 {
    color: var(--aeu-text);
    margin: 0 0 8px 0;
    font-size: 16px;
}

.no-slots-message p {
    margin: 0;
    font-size: 14px;
}

/* Time Slot Loading */
.time-slot-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
}

.loading-spinner-small {
    width: 32px;
    height: 32px;
    border: 3px solid var(--aeu-border-light);
    border-top: 3px solid var(--aeu-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* Legacy styles for compatibility */
.loading-slots,
.no-slots,
.error-slots {
    text-align: center;
    color: var(--aeu-text-muted);
    font-style: italic;
    padding: 40px 20px;
}

.error-slots {
    color: var(--aeu-error);
}

/* ==========================================================================
   Contact Information Form
   ========================================================================== */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group label {
    color: var(--aeu-text);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.required {
    color: var(--aeu-error);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 5px 16px;
    border: 1px solid var(--aeu-border);
    border-radius: var(--aeu-radius);
    font-size: 16px;
    height: 50px !important;
    transition: var(--aeu-transition);
    /*background: var(--aeu-bg-white);*/
    color: var(--aeu-primary) !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--aeu-secondary);
    box-shadow: 0 0 0 3px rgba(255, 131, 0, 0.1);
}

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

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==========================================================================
   Booking Summary
   ========================================================================== */

.booking-summary {
    background: var(--aeu-bg-light);
    border-radius: var(--aeu-radius);
    padding: 24px;
    margin-bottom: 30px;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--aeu-border-light);
}

.summary-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.summary-section h4 {
    color: var(--aeu-primary);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    color: var(--aeu-text);
    font-size: 16px;
    font-weight: 500;
}

/* ==========================================================================
   Loading & Success States
   ========================================================================== */

.booking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--aeu-radius-lg);
    z-index: 1000;
}

.booking-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--aeu-border-light);
    border-left: 4px solid var(--aeu-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.booking-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--aeu-success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px auto;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.booking-success h3 {
    color: var(--aeu-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.booking-success p {
    color: var(--aeu-text-muted);
    font-size: 16px;
    margin: 0 0 20px 0;
}

.success-details {
    background: var(--aeu-bg-light);
    border-radius: var(--aeu-radius);
    padding: 20px;
    text-align: left;
    margin-top: 20px;
}

/* ==========================================================================
   Form Validation Errors
   ========================================================================== */

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1) !important;
    background-color: rgba(244, 67, 54, 0.02);
}

.form-group.has-error label {
    color: #f44336;
}

.field-error {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 4px 8px;
    background-color: rgba(244, 67, 54, 0.05);
    border-left: 3px solid #f44336;
    border-radius: 2px;
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for error fields */
.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
    border-color: #ff5722 !important;
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.2) !important;
}

/* Error styling for different themes */
.aeu-corporate-theme .form-group.has-error input,
.aeu-corporate-theme .form-group.has-error select {
    border-color: #f44336;
}

.aeu-corporate-theme .field-error {
    background-color: rgba(244, 67, 54, 0.08);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .aeu-booking-form {
        margin: 10px;
        padding: 16px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .service-grid,
    .consultant-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .step-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .step-navigation .btn {
        width: 100%;
        justify-content: center;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--aeu-text-muted);
}

.hidden {
    display: none;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================================================
   Powered By
   ========================================================================== */

.aeu-booking-powered-by {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--aeu-border-light);
}

.aeu-booking-powered-by small {
    color: var(--aeu-text-muted);
    font-size: 12px;
}

.aeu-booking-powered-by a {
    color: var(--aeu-secondary);
    text-decoration: none;
}

.aeu-booking-powered-by a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Loading Indicators
   ========================================================================== */

.aeu-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 120px;
}

.aeu-loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--aeu-border-light);
    border-top: 4px solid var(--aeu-secondary);
    border-radius: 50%;
    animation: aeu-spin 1s linear infinite;
    margin-bottom: 15px;
}

.aeu-loading-indicator p {
    color: var(--aeu-text-muted);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

@keyframes aeu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Modal Booking Trigger Buttons
   ========================================================================== */

.aeu-booking-button,
.aeu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--aeu-secondary);
    color: white;
    border: none;
    border-radius: var(--aeu-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--aeu-transition);
    gap: 8px;
    font-family: inherit;
    line-height: 1.4;
}

.aeu-booking-button:hover,
.aeu-btn:hover {
    background: #e67600;
    transform: translateY(-2px);
    box-shadow: var(--aeu-shadow);
    color: white;
    text-decoration: none;
}

.aeu-booking-button:active,
.aeu-btn:active {
    transform: translateY(0);
}

/* Button variants */
.aeu-booking-button.aeu-btn-primary,
.aeu-btn.aeu-btn-primary {
    background: var(--aeu-primary);
}

.aeu-booking-button.aeu-btn-primary:hover,
.aeu-btn.aeu-btn-primary:hover {
    background: #1a2328;
}

.aeu-booking-button.aeu-btn-outline,
.aeu-btn.aeu-btn-outline {
    background: transparent;
    color: var(--aeu-secondary);
    border: 2px solid var(--aeu-secondary);
}

.aeu-booking-button.aeu-btn-outline:hover,
.aeu-btn.aeu-btn-outline:hover {
    background: var(--aeu-secondary);
    color: white;
}

/* Button sizes */
.aeu-booking-button.aeu-btn-small,
.aeu-btn.aeu-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.aeu-booking-button.aeu-btn-large,
.aeu-btn.aeu-btn-large {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
}

/* Icon support - removed calendar emoji */
.aeu-booking-button::before,
.aeu-btn::before {
    content: '';
    font-size: 0.9em;
}

.aeu-booking-button.no-icon::before,
.aeu-btn.no-icon::before {
    display: none;
}

/* Block button */
.aeu-booking-button.aeu-btn-block,
.aeu-btn.aeu-btn-block {
    width: 100%;
    display: flex;
}

/* Disabled state */
.aeu-booking-button:disabled,
.aeu-btn:disabled,
.aeu-booking-button.disabled,
.aeu-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.aeu-booking-button:disabled:hover,
.aeu-btn:disabled:hover,
.aeu-booking-button.disabled:hover,
.aeu-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Corporate Button Themes
   ========================================================================== */

/* Base Corporate Theme */
.aeu-corporate-theme {
    cursor: pointer;
    height: 70px;
    padding: 0 60px;
    font-family: "Sora", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #121820;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: inset 0 0 0 0 #f57c00;
    border: solid 2px transparent;
    border-radius: 40px;
    text-decoration: none;
    transition: 0.2s cubic-bezier(0, 0, 0.3642, 1);
    background-color: transparent;
}

/* Corporate Border Theme */
.aeu-booking-button-border {
    border-color: #f57c00;
    background-color: transparent;
    color: #121820;
}

.aeu-booking-button-border:hover {
    box-shadow: inset 0 0 0 1px #f57c00;
    backdrop-filter: blur(10px);
}

/* Corporate Border Light Theme (white text with orange border) */
.aeu-booking-button-border-light {
    border-color: #f57c00;
    background-color: transparent;
    color: #ffffff !important;
}

.aeu-booking-button-border-light:hover {
    box-shadow: inset 0 0 0 1px #f57c00;
    backdrop-filter: blur(10px);
    background-color: rgba(245, 124, 0, 0.1);
}

/* Corporate Border Dark Theme (dark text with orange border) */
.aeu-booking-button-border-dark {
    border-color: #f57c00;
    background-color: transparent;
    color: #121820 !important;
}

.aeu-booking-button-border-dark:hover {
    box-shadow: inset 0 0 0 1px #f57c00;
    backdrop-filter: blur(10px);
    background-color: rgba(245, 124, 0, 0.1);
}

/* Corporate Light Theme */
.aeu-corporate-light {
    color: rgb(255, 255, 255) !important;
    background-color: #f57c00 !important;
    border-color: #f57c00 !important;
}

.aeu-corporate-light:hover {
    background-color: #e67600 !important;
    box-shadow: 0 8px 16px rgba(245, 124, 0, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Corporate Dark Theme */
.aeu-corporate-dark {
    color: rgb(255, 255, 255) !important;
    background-color: #121820 !important;
    border-color: #121820 !important;
}

.aeu-corporate-dark:hover {
    background-color: #1e2835 !important;
    box-shadow: 0 8px 16px rgba(18, 24, 32, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Corporate theme size adjustments */
.aeu-corporate-theme.aeu-btn-small {
    height: 50px;
    padding: 0 40px;
    font-size: 13px;
}

.aeu-corporate-theme.aeu-btn-large {
    height: 90px;
    padding: 0 80px;
    font-size: 17px;
}

/* ==========================================================================
   Inline Form Themes
   ========================================================================== */

/* Theme Default - Clean white card */
.aeu-booking-form.theme-default {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Theme Modern - Gradient purple style */
.aeu-booking-form.theme-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
    color: #ffffff;
}

.aeu-booking-form.theme-modern .step-title,
.aeu-booking-form.theme-modern label {
    color: #ffffff;
}

.aeu-booking-form.theme-modern input,
.aeu-booking-form.theme-modern select,
.aeu-booking-form.theme-modern textarea {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
}

/* Theme Minimal - Clean minimal style */
.aeu-booking-form.theme-minimal {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    box-shadow: none;
}

.aeu-booking-form.theme-minimal .step-title {
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.aeu-booking-form.theme-minimal input,
.aeu-booking-form.theme-minimal select,
.aeu-booking-form.theme-minimal textarea {
    border: none;
    border-bottom: 2px solid #e1e5e9;
    border-radius: 0;
    background: transparent;
    padding: 15px 0;
}

.aeu-booking-form.theme-minimal input:focus,
.aeu-booking-form.theme-minimal select:focus,
.aeu-booking-form.theme-minimal textarea:focus {
    border-bottom-color: #ff8300;
    box-shadow: none;
}

/* Theme Corporate - AEU corporate style */
.aeu-booking-form.theme-corporate {
    background: #f8f9fa;
    border: 2px solid #2f3a3f;
    border-radius: 4px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(47, 58, 63, 0.15);
}

.aeu-booking-form.theme-corporate .step-title {
    color: #2f3a3f;
    border-bottom: 3px solid #ff8300;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* Loading states for specific components */

.consultant-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.time-slots-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================================================
   Modal Booking Form Styles
   ========================================================================== */

/* AEU Booking Modal Styles */
.aeu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 58, 63, 0.8);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.aeu-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.aeu-modal-container {
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.aeu-modal-overlay.show .aeu-modal-container {
    transform: scale(1) translateY(0);
}

.aeu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #2f3a3f 0%, #3d4a50 100%);
    border-radius: 12px 12px 0 0;
}

.aeu-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.aeu-modal-header h2:before {
    content: '📅';
    font-size: 20px;
}

.aeu-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.aeu-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.aeu-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.aeu-booking-form-container {
    min-height: 500px;
    position: relative;
}

/* Maintain height during success state */
.aeu-modal-form-content.success-mode {
    min-height: 400px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.aeu-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.aeu-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff8300;
    border-radius: 50%;
    animation: aeu-modal-spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes aeu-modal-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.aeu-modal-loading p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

.aeu-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.aeu-modal-powered-by {
    margin: 0;
    text-align: center;
}

.aeu-modal-powered-by small {
    color: #6c757d;
    font-size: 12px;
}

.aeu-modal-powered-by a {
    color: #ff8300;
    text-decoration: none;
    font-weight: 500;
}

.aeu-modal-powered-by a:hover {
    color: #e6750a;
    text-decoration: underline;
}

/* Form content styling when loaded in modal */
.aeu-modal-form-content .aeu-booking-form {
    border: none;
    box-shadow: none;
    margin: 0;
    max-width: none;
}

/* Make inline forms look exactly like modal forms */
.aeu-booking-form.modal-style {
    box-shadow: none;
    margin: 0;
    max-width: none;
    border: 1px solid var(--aeu-secondary);
    padding: 15px;
}

.aeu-modal-form-content .step-progress {
    margin-bottom: 30px;
}

/* Prevent body scroll when modal is open while maintaining position */
body.aeu-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    /* Fix for Edge browser scroll jump */
    overscroll-behavior: none;
}

/* Error state in modal */
.aeu-modal-error {
    text-align: center;
    padding: 60px 40px;
}

.aeu-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.aeu-modal-error h3 {
    color: #dc3545;
    margin-bottom: 16px;
    font-size: 20px;
}

.aeu-modal-error p {
    color: #6c757d;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Success state in modal and regular form */
.booking-success {
    padding: 40px;
    text-align: center;
    min-height: 400px;
    display: none; /* Hidden by default */
    background: var(--aeu-border);
}

/* Success state inherits form theme styling when inside form container */
.aeu-booking-form .booking-success {
    background: inherit;
    border: none;
    border-radius: inherit;
    box-shadow: none;
    margin: 0;
    padding: 60px 40px;
}

/* Theme-specific success message styling */
.aeu-booking-form.theme-modern .booking-success {
    color: #ffffff;
}

.aeu-booking-form.theme-modern .booking-success h3 {
    color: #ffffff;
}

.aeu-booking-form.theme-modern .booking-success .success-details {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.aeu-booking-form.theme-modern .booking-success .success-details strong {
    color: #ffffff;
}

.aeu-booking-form.theme-corporate .booking-success h3 {
    color: #2f3a3f;
    border-bottom: 3px solid #ff8300;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.aeu-booking-form.theme-minimal .booking-success {
    padding: 40px 0;
}

.aeu-booking-form.theme-minimal .booking-success h3 {
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.booking-success-content {
    max-width: 500px;
    margin: 0 auto;
}

.booking-success .success-icon {
    font-size: 64px;
    margin-bottom: 24px;
    display: block;
}

.booking-success h3 {
    color: #28a745;
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 600;
}

.booking-success > p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.booking-success .success-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.booking-success .success-details h4 {
    color: #2f3a3f;
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: center;
}

.booking-success .success-details p {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
}

.booking-success .success-details strong {
    color: #2f3a3f;
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

.booking-success .success-actions {
    margin-top: 24px;
}

.booking-success .success-note {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

/* Management Link Styles */
.booking-success .management-link {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--aeu-radius);
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.booking-success .management-link p {
    margin: 0 0 12px 0;
    color: var(--aeu-text);
}

.booking-success .btn-manage-appointment {
    display: inline-block;
    background: var(--aeu-primary);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--aeu-radius);
    font-weight: 600;
    transition: var(--aeu-transition);
    margin: 10px 0;
}

.booking-success .btn-manage-appointment:hover {
    background: #1a2529;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--aeu-shadow-lg);
}

.booking-success .management-note {
    color: #6c757d;
    font-size: 13px;
    margin: 12px 0 0 0;
    line-height: 1.4;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .aeu-modal-overlay {
        padding: 10px;
    }
    
    .aeu-modal-container {
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .aeu-modal-header {
        padding: 20px 24px;
        border-radius: 8px 8px 0 0;
    }
    
    .aeu-modal-header h2 {
        font-size: 20px;
    }
    
    .aeu-modal-footer {
        padding: 16px 24px;
        border-radius: 0 0 8px 8px;
    }
}

/* Success Checkmark Circle Icon */
.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #4caf50;
    position: relative;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkmark-bounce 0.6s ease-in-out;
}

.checkmark {
    width: 24px;
    height: 12px;
    border: 3px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    margin-top: -3px;
    margin-left: 2px;
}

@keyframes checkmark-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    text-align: center;
    margin-bottom: 20px;
}
