/* WL Appointment Booking Widget Styles */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

.wla-booking-shell,
.wla-booking,
.wla-booking *,
.wla-booking *::before,
.wla-booking *::after {
    box-sizing: border-box;
    font-family: Poppins, "Segoe UI", sans-serif;
}

.wla-booking {
    --wla-primary: #09466B;
    --wla-secondary: #15AC9E;
    --wla-radius: 12px;
    --wla-text: #2A2A2A;
    --wla-text-light: #666;
    --wla-border: #e0e0e0;
    --wla-bg: #f8f9fa;

    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 28px;
    border: 3px solid var(--wla-primary);
    border-radius: 10px;
    background: #fff;
}

.wla-booking-shell {
    width: 100%;
    max-width: 100%;
}

.wla-booking-highlights {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    margin: 0 0 10px;
    padding: 15px 24px;
    border-radius: 10px;
    background: #09466B;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.wla-booking-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wla-booking-highlights i {
    color: #fff;
    font-size: 16px;
}

.wla-booking-highlights span + span::before {
    margin-right: 26px;
    color: #fff;
    content: '•';
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 760px) {
    .wla-booking { padding: 20px 16px; }
    .wla-booking-highlights {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin: 0 0 10px;
        padding: 15px 18px;
    }
    .wla-booking-highlights span + span::before { display: none; }
}

/* Elementor widget wrapper reset */
.elementor-widget-wla_booking,
.elementor-widget-wla_booking .elementor-widget-container {
    width: 100%;
    max-width: 100%;
}

/* Progress Steps */
.wla-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 30px;
    gap: 0;
    width: 100%;
    max-width: 100%;
}

.wla-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.wla-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wla-border);
    color: var(--wla-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wla-progress-step.active .wla-step-number,
.wla-progress-step.completed .wla-step-number {
    background: var(--wla-primary);
    color: #fff;
}

.wla-progress-step.completed .wla-step-number {
    background: var(--wla-secondary);
}

.wla-step-label {
    font-size: 12px;
    color: var(--wla-text-light);
    margin-top: 8px;
    text-align: center;
    max-width: 80px;
}

.wla-progress-step.active .wla-step-label {
    color: var(--wla-primary);
    font-weight: 500;
}

.wla-progress-line {
    width: 60px;
    height: 2px;
    background: var(--wla-border);
    margin: 0 10px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.wla-progress-step.completed + .wla-progress-line {
    background: var(--wla-secondary);
}

/* Steps */
.wla-step {
    display: none;
    animation: wlaFadeIn 0.4s ease;
    width: 100%;
    max-width: 100%;
}

.wla-step.active {
    display: block;
    width: 100%;
    max-width: 100%;
}

.wla-services-grid,
.wla-datetime-container,
.wla-contact-form,
.wla-booking-summary,
.wla-step-actions,
.wla-calendar-wrapper,
.wla-timeslots-wrapper {
    width: 100%;
    max-width: 100%;
}

.wla-step-title {
    width: 100%;
}

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

.wla-step-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--wla-text);
    text-align: center;
    width: 100%;
    max-width: 100%;
}

/* Service Cards */
.wla-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
}

.wla-service-card {
    background: #fff;
    border: 2px solid var(--wla-border);
    border-radius: var(--wla-radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.wla-service-card:hover {
    border: 1px solid var(--wla-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.wla-service-card.selected {
    border: 1px solid var(--wla-primary);
    background: rgba(52, 152, 219, 0.05);
}

.wla-service-color {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.wla-service-content {
    padding-left: 8px;
}

.wla-service-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--wla-text);
}

.wla-service-desc {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--wla-text-light);
    line-height: 1.5;
}

.wla-service-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--wla-text-light);
}

.wla-service-duration,
.wla-service-price {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wla-service-duration svg {
    opacity: 0.6;
}

.wla-service-price {
    font-weight: 600;
    color: var(--wla-primary);
}

.wla-service-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wla-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.wla-service-card.selected .wla-service-check {
    opacity: 1;
    transform: scale(1);
}

/* Calendar */
.wla-datetime-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
}

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

.wla-calendar-wrapper {
    background: #fff;
    border: 1px solid var(--wla-border);
    border-radius: var(--wla-radius);
    padding: 20px;
}

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

.wla-calendar-month {
    font-size: 16px;
    font-weight: 600;
    color: var(--wla-text);
}

.wla-calendar-nav, button.wla-calendar-nav {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--wla-text-light);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.wla-booking button.wla-calendar-nav,
.wla-booking button.wla-btn {
    min-height: 44px;
    margin: 0;
    font-family: inherit;
    line-height: 1.2;
}

.wla-calendar-nav:hover {
    background: var(--wla-bg);
    color: var(--wla-primary);
}

.wla-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

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

.wla-calendar-weekdays span {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--wla-text-light);
    padding: 8px 0;
}

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

.wla-calendar-day, button.wla-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    color: var(--wla-text);
}

/* Prevent global Elementor button styling from overriding calendar days. */
.wla-booking button.wla-calendar-day {
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--wla-text);
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    appearance: none;
}

.wla-calendar-day:hover:not(.disabled):not(.other-month) {
    background: var(--wla-bg);
}

.wla-calendar-day.today {
    font-weight: 600;
    color: var(--wla-primary);
}

.wla-calendar-day.selected {
    border-color: var(--wla-primary) !important;
    background: var(--wla-primary) !important;
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(9, 70, 107, 0.22) !important;
}

.wla-calendar-day.disabled,
.wla-calendar-day.other-month {
    color: #ccc;
    cursor: not-allowed;
}

/* Past dates are visibly unavailable while future unavailable dates stay subtle. */
.wla-calendar-day.past,
.wla-booking button.wla-calendar-day.past {
    border-color: #e6e9eb;
    background: #f1f3f4;
    color: #a4aaae;
    opacity: 0.72;
}

.wla-calendar-day.other-month {
    visibility: hidden;
}

.wla-calendar-day.has-slots::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--wla-secondary);
}

/* Time Slots */
.wla-timeslots-wrapper {
    background: #fff;
    border: 1px solid var(--wla-border);
    border-radius: var(--wla-radius);
    padding: 20px;
}

.wla-timeslots-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--wla-text);
}

.wla-timeslots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    overflow-y: auto;
}

.wla-select-date-hint {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--wla-text-light);
    padding: 40px 0;
}

.wla-timeslot {
    min-height: 44px;
    padding: 10px 8px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--wla-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--wla-primary);
    transition: all 0.2s ease;
}

.wla-booking button.wla-timeslot {
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 8px;
    border: 1px solid var(--wla-border);
    border-radius: 10px;
    background: #fff;
    color: var(--wla-primary);
    box-shadow: none;
    font-family: inherit;
    line-height: 1.2;
    appearance: none;
}

.wla-timeslot:hover {
    border-color: var(--wla-primary);
    background: rgba(9, 70, 107, 0.06);
    transform: translateY(-1px);
}

.wla-timeslot.selected {
    border-color: var(--wla-primary) !important;
    background: var(--wla-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(9, 70, 107, 0.2) !important;
}

.wla-no-slots {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--wla-text-light);
    padding: 40px 0;
}

/* Contact Form */
.wla-booking-summary {
    background: var(--wla-bg);
    border-radius: var(--wla-radius);
    padding: 20px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 480px) {
    .wla-booking-summary {
        grid-template-columns: 1fr;
    }
}

.wla-summary-item {
    text-align: center;
}

.wla-summary-label {
    display: block;
    font-size: 12px;
    color: var(--wla-text-light);
    margin-bottom: 4px;
}

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

.wla-contact-form {
    background: #fff;
    border: 1px solid var(--wla-border);
    border-radius: var(--wla-radius);
    padding: 24px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
}

.wla-form-row {
    margin-bottom: 16px;
}

.wla-form-row:last-child {
    margin-bottom: 0;
}

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

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

.wla-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--wla-text);
    margin-bottom: 6px;
}

.wla-form-field input,
.wla-form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wla-border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.wla-form-field input:focus,
.wla-form-field textarea:focus {
    outline: none;
    border-color: var(--wla-primary);
}

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

.wla-checkbox-field label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.wla-checkbox-field input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

.wla-checkbox-field a {
    color: var(--wla-primary);
}

.wla-hp {
    position: absolute;
    left: -9999px;
}

.wla-form-error {
    background: #fee;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

/* Buttons */
.wla-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.wla-step-actions .wla-btn:only-child {
    margin-left: auto;
}

.wla-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wla-booking button:focus-visible,
.wla-service-card:focus-visible {
    outline: 3px solid var(--wla-secondary);
    outline-offset: 3px;
}

.wla-btn-primary {
    background: var(--wla-primary);
    color: #fff;
}

.wla-btn-primary:hover:not(:disabled) {
    filter: brightness(1.1);
}

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

.wla-btn-secondary {
    background: var(--wla-bg);
    color: var(--wla-text);
    border: 1px solid var(--wla-border);
}

.wla-btn-secondary:hover {
    background: #eee;
}

/* Success State */
.wla-step-success {
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    max-width: 100%;
}

.wla-success-icon {
    color: var(--wla-secondary);
    margin-bottom: 20px;
}

.wla-success-title {
    font-size: 28px;
    margin: 0 0 12px;
}

.wla-success-message {
    font-size: 16px;
    color: var(--wla-text-light);
    margin: 0 0 24px;
    margin-left: auto;
    margin-right: auto;
}

.wla-booking-details {
    background: var(--wla-bg);
    border-radius: var(--wla-radius);
    padding: 20px;
    display: inline-block;
    text-align: left;
}

.wla-booking-details p {
    margin: 8px 0;
}

/* Loading */
.wla-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--wla-radius);
}

.wla-loading.active {
    display: flex;
}

.wla-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--wla-border);
    border-top-color: var(--wla-primary);
    border-radius: 50%;
    animation: wlaSpin 0.8s linear infinite;
}

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

/* No Services */
.wla-no-services {
    text-align: center;
    padding: 40px;
    color: var(--wla-text-light);
    background: var(--wla-bg);
    border-radius: var(--wla-radius);
}

/* Timeslots Loading */
.wla-timeslots-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--wla-text-light);
}

.wla-spinner-small {
    width: 24px;
    height: 24px;
    border: 3px solid var(--wla-border);
    border-top-color: var(--wla-primary);
    border-radius: 50%;
    animation: wlaSpin 0.8s linear infinite;
}

/* Compact touch layout for narrow screens. */
@media (max-width: 480px) {
    .wla-progress { justify-content: space-between; padding: 8px 0 22px; }
    .wla-step-label { max-width: 64px; font-size: 11px; }
    .wla-progress-line { width: auto; flex: 1; min-width: 12px; margin-right: 6px; margin-left: 6px; }
    .wla-calendar-wrapper,
    .wla-timeslots-wrapper,
    .wla-contact-form { padding: 16px; }
    .wla-timeslots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wla-step-actions { flex-direction: column-reverse; }
    .wla-step-actions .wla-btn,
    .wla-step-actions .wla-btn:only-child { width: 100%; margin: 0; justify-content: center; }
}
