.wm-event-form,
.form_message {
    --wm-f4e-primary: #3152ff;
    --wm-f4e-primary-dark: #243fd7;
    --wm-f4e-button-bg: #3152ff;
    --wm-f4e-button-hover: #243fd7;
    --wm-f4e-button-text: #ffffff;
    --wm-f4e-waitlist-bg: #111827;
    --wm-f4e-waitlist-hover: #020617;
    --wm-f4e-waitlist-text: #ffffff;
    --wm-f4e-text: #111827;
    --wm-f4e-muted: #6b7280;
    --wm-f4e-border: #d9dee8;
    --wm-f4e-soft: #f7f8fb;
    --wm-f4e-bg: #ffffff;
    --wm-f4e-card-bg: #ffffff;
    --wm-f4e-success: #118a43;
    --wm-f4e-danger: #c93535;
    --wm-f4e-max-width: 760px;
    --wm-f4e-radius: 20px;
    --wm-f4e-field-radius: 12px;
    --wm-f4e-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
    --wm-f4e-card-padding: 34px;
    --wm-f4e-field-height: 46px;
    --wm-f4e-field-padding: 11px 13px;
    --wm-f4e-row-gap: 18px;
    --wm-f4e-appointment-padding: 14px 16px;
    --wm-f4e-appointment-gap: 10px;
    box-sizing: border-box;
}

.wm-event-form *,
.form_message * {
    box-sizing: border-box;
}

.form_message_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.form_message {
    width: 100%;
    max-width: var(--wm-f4e-max-width);
    margin: 24px auto;
    padding: 40px 34px;
    border: 1px solid #edf0f5;
    border-radius: var(--wm-f4e-radius);
    background: var(--wm-f4e-card-bg);
    box-shadow: var(--wm-f4e-shadow);
    color: var(--wm-f4e-text);
    text-align: center;
}

.form_message_wrapper code {
    all: unset;
}

.form_message img {
    display: block;
    width: 76px;
    height: auto;
    margin: 0 auto 18px;
}

.form_message .wm-form4events-confirmation-pending {
    position: relative;
    padding-top: 18px;
}

.form_message .wm-form4events-confirmation-pending::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: 72px;
    height: 4px;
    border-radius: 999px;
    background: #f59e0b;
    content: "";
    transform: translateX(-50%);
}

.form_message .wm-form4events-confirmation-pending h3,
.form_message_wrapper .form_message .wm-form4events-confirmation-pending h3 {
    margin-top: 4px;
}

.form_message .wm-form4events-action-note-emphasis {
    max-width: 660px;
    margin: 20px auto 0;
    padding: 13px 16px;
    border: 1px solid #f4d28a;
    border-radius: 12px;
    background: #fff9eb;
    color: #6f4b00;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

.form_message .wm-form4events-action-note-emphasis > :last-child {
    margin-bottom: 0;
}

.form_message h3,
.form_message_wrapper .form_message h3 {
    margin: 12px 0 10px;
    color: var(--wm-f4e-text);
    font-family: inherit;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.2;
    text-align: center;
}

.form_message p,
.form_message_wrapper .form_message p {
    margin: 0 0 14px;
    color: var(--wm-f4e-muted);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.65;
}

.form_message a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 13px 22px;
    border: 1px solid var(--wm-f4e-border);
    border-radius: var(--wm-f4e-field-radius);
    background: #fff;
    color: var(--wm-f4e-text);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}

.form_message .fff_form {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.form_message button.wm-btn,
.form_message .fff_form .wm-btn,
.form_message .fff_form button.wm-form4events-action-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 52px !important;
    padding: 14px 28px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, var(--wm-f4e-button-bg) 0%, var(--wm-f4e-primary-dark) 100%) !important;
    color: var(--wm-f4e-button-text) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 14px 30px rgba(49, 82, 255, 0.22) !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

.form_message button.wm-btn:hover,
.form_message button.wm-btn:focus,
.form_message .fff_form .wm-btn:hover,
.form_message .fff_form .wm-btn:focus,
.form_message .fff_form button.wm-form4events-action-button:hover,
.form_message .fff_form button.wm-form4events-action-button:focus {
    transform: translateY(-1px) !important;
    box-shadow: 0 18px 34px rgba(49, 82, 255, 0.28) !important;
    filter: brightness(1.03) !important;
    outline: none !important;
}

.form_message button.wm-btn:focus-visible,
.form_message .fff_form .wm-btn:focus-visible,
.form_message .fff_form button.wm-form4events-action-button:focus-visible {
    outline: 3px solid rgba(49, 82, 255, 0.16) !important;
    outline-offset: 3px !important;
}

.wm-event-form.form-wrapper {
    width: 100%;
    max-width: var(--wm-f4e-max-width);
    margin: 24px auto;
    padding: var(--wm-f4e-card-padding);
    border: 1px solid #edf0f5;
    border-radius: var(--wm-f4e-radius);
    background: var(--wm-f4e-card-bg);
    box-shadow: var(--wm-f4e-shadow);
    color: var(--wm-f4e-text);
}

.wm-event-form.wm-form4events-design-preset-minimal.form-wrapper {
    padding: 0;
    border-color: transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.wm-event-form.wm-form4events-design-preset-full-width.form-wrapper {
    max-width: 100%;
}

.wm-event-form .wm-form4events-registration-form {
    display: grid;
    gap: var(--wm-f4e-row-gap);
}

.wm-event-form h3 {
    margin: 0 0 24px;
    color: var(--wm-f4e-text);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.15;
}

.wm-event-form.wm-form4events-density-compact h3 {
    margin-bottom: 18px;
}

.wm-event-form.wm-form4events-density-large h3 {
    margin-bottom: 30px;
}

.wm-form4events-closed-notice,
.wm-form4events-no-appointments {
    padding: 16px 18px;
    border: 1px solid #f0d2d2;
    border-radius: var(--wm-f4e-field-radius);
    background: #fff7f7;
    color: #7f1d1d;
    font-weight: 600;
    text-align: center;
}

.wm-event-form label {
    display: block;
    margin-bottom: 7px;
    color: var(--wm-f4e-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.wm-event-form input[type="text"],
.wm-event-form input[type="email"],
.wm-event-form input[type="tel"],
.wm-event-form input[type="url"],
.wm-event-form input[type="number"],
.wm-event-form textarea {
    width: 100%;
    min-height: var(--wm-f4e-field-height);
    padding: var(--wm-f4e-field-padding);
    margin: 0;
    border: 1px solid var(--wm-f4e-border);
    border-radius: var(--wm-f4e-field-radius);
    background: #fff;
    color: var(--wm-f4e-text);
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.wm-event-form textarea {
    min-height: 110px;
    resize: vertical;
}

.wm-event-form input:focus,
.wm-event-form textarea:focus {
    border-color: var(--wm-f4e-primary);
    box-shadow: 0 0 0 3px rgba(49, 82, 255, .12);
}

.wm-form4events-field-row {
    margin-bottom: 0;
}

.wm-event-form .wm-form4events-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wm-f4e-row-gap);
    min-width: 0;
}

.wm-event-form .wm-form4events-field-width-100 {
    grid-column: 1 / -1;
}

.wm-event-form .wm-form4events-field-width-50 {
    grid-column: span 1;
    min-width: 0;
}

.wm-event-form .appointment_selection {
    margin-bottom: 0;
}

.wm-event-form .appointment_title {
    margin-bottom: 12px;
    font-size: 15px;
}

.lbl_outer_area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-bottom: var(--wm-f4e-appointment-gap);
    padding: var(--wm-f4e-appointment-padding);
    border: 1px solid var(--wm-f4e-border);
    border-radius: var(--wm-f4e-field-radius);
    background: var(--wm-f4e-soft);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.lbl_outer_area.is-bookable:hover,
.lbl_outer_area:has(input[type="radio"]:checked) {
    border-color: var(--wm-f4e-primary);
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, .06);
}

.lbl_outer_area.disable_selection {
    opacity: .86;
}

.lbl_outer_area:last-child {
    margin-bottom: 0;
}

.wm-event-form.wm-form4events-appointments-list .lbl_outer_area {
    margin-bottom: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
}

.wm-event-form.wm-form4events-appointments-list .lbl_outer_area + .lbl_outer_area {
    border-top: 0;
}

.wm-event-form.wm-form4events-appointments-list .lbl_outer_area.is-bookable:hover,
.wm-event-form.wm-form4events-appointments-list .lbl_outer_area:has(input[type="radio"]:checked) {
    background: var(--wm-f4e-soft);
    box-shadow: none;
}

.wm-event-form.wm-form4events-appointments-compact .lbl_outer_area {
    margin-bottom: 6px;
    padding: 10px 12px;
    border-radius: calc(var(--wm-f4e-field-radius) - 2px);
}

.wm-event-form .custom-radio {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    font-weight: 700;
}

.wm-event-form .custom-radio.disabled {
    cursor: not-allowed;
    color: var(--wm-f4e-muted);
    text-decoration: none;
}

.wm-event-form .wm-form4events-appointment-label-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.3;
}

.wm-event-form .wm-form4events-appointment-date {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.wm-event-form .wm-form4events-appointment-time {
    display: block;
    margin-top: 2px;
    color: var(--wm-f4e-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.wm-event-form .custom-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wm-event-form .checkmark {
    position: relative;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 2px solid #b8c0d2;
    border-radius: 999px;
    background: #fff;
}

.wm-event-form .custom-radio input[type="radio"]:checked + .checkmark {
    border-color: var(--wm-f4e-primary);
}

.wm-event-form .custom-radio input[type="radio"]:checked + .checkmark::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 999px;
    background: var(--wm-f4e-primary);
}

.wm-event-form small {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    color: var(--wm-f4e-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.waiting_list_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 28px;
    padding: 5px 10px !important;
    border: 0 !important;
    border-radius: var(--wm-f4e-field-radius) !important;
    background: var(--wm-f4e-waitlist-bg) !important;
    color: var(--wm-f4e-waitlist-text) !important;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1 !important;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.waiting_list_btn:hover,
.waiting_list_btn:focus {
    background: var(--wm-f4e-waitlist-hover) !important;
    color: var(--wm-f4e-waitlist-text) !important;
    box-shadow: 0 8px 18px rgba(17, 24, 39, .16);
    transform: translateY(-1px);
}

.privacy_notice {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #edf0f5;
    border-radius: var(--wm-f4e-field-radius);
    background: var(--wm-f4e-soft);
}

.privacy_notice p {
    margin: 0;
    color: var(--wm-f4e-muted);
    font-size: 12px;
    line-height: 1.55;
}

.wm-event-form button.wm-btn,
.wm-event-form .wm-eventform-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 13px 18px;
    border: none;
    border-radius: var(--wm-f4e-field-radius);
    background: var(--wm-f4e-button-bg);
    color: var(--wm-f4e-button-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.wm-event-form button.wm-btn:hover,
.wm-event-form .wm-eventform-submit:hover {
    background: var(--wm-f4e-button-hover);
    box-shadow: 0 10px 24px rgba(49, 82, 255, .22);
    transform: translateY(-1px);
}

.wm-event-form button:disabled,
.wm-event-form button[disabled] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.wm-eventform-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    width: 100%;
    height: 100%;
    padding: 24px;
    overflow-y: auto;
    background: rgba(17, 24, 39, .42);
    backdrop-filter: blur(3px);
}

.wm-eventform-modal.wm-event-form.form-wrapper {
    position: relative;
    max-width: 440px;
    margin: 8vh auto;
    padding: 28px;
    border-radius: var(--wm-f4e-radius);
}

.wm-eventform-close {
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--wm-f4e-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.wm-eventform-group {
    margin-bottom: 16px;
}

@media (max-width: 700px) {
    .wm-event-form.form-wrapper,
    .form_message {
        margin: 16px auto;
        padding: min(var(--wm-f4e-card-padding), 24px) 20px;
        border-radius: min(var(--wm-f4e-radius), 16px);
    }

    .wm-event-form.wm-form4events-design-preset-minimal.form-wrapper {
        padding: 0;
    }

    .lbl_outer_area {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .wm-event-form small {
        justify-content: flex-start;
        white-space: normal;
    }

    .wm-event-form .wm-form4events-fields-grid {
        grid-template-columns: 1fr;
    }

    .wm-event-form .wm-form4events-field-width-50,
    .wm-event-form .wm-form4events-field-width-100 {
        grid-column: 1 / -1;
    }

    .wm-eventform-overlay {
        padding: 14px;
    }

    .wm-eventform-modal.wm-event-form.form-wrapper {
        margin: 6vh auto;
    }
}

@media (max-width: 640px) {
    .form_message img {
        width: 64px;
        margin-bottom: 14px;
    }
}


.wm-event-form .wm-form4events-form-intro {
    margin: 0 0 24px;
}

.wm-event-form .wm-form4events-form-intro h3 {
    margin-bottom: 14px;
}

.wm-event-form .wm-form4events-form-intro-text {
    max-width: 100%;
    color: var(--wm-f4e-muted);
    font-size: 16px;
    line-height: 1.65;
}

.wm-event-form .wm-form4events-form-intro-text p {
    margin: 0 0 12px;
}

.wm-event-form .wm-form4events-form-intro-text p:last-child {
    margin-bottom: 0;
}

.form_message .wm-form4events-action-message,
.form_message .wm-form4events-action-note {
    margin: 0 auto 14px;
    color: var(--wm-f4e-muted);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.65;
}

.form_message .wm-form4events-action-message p,
.form_message .wm-form4events-action-note p {
    margin: 0 0 10px;
}

.form_message .wm-form4events-action-message p:last-child,
.form_message .wm-form4events-action-note p:last-child {
    margin-bottom: 0;
}

.form_message .wm-form4events-action-note {
    font-size: 14px;
}

.wm-eventform-modal-header {
    margin: 0 0 20px;
    padding-right: 34px;
}

.wm-eventform-modal.wm-event-form.form-wrapper .wm-eventform-modal-title {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.25;
}

.wm-eventform-modal-text,
.wm-eventform-modal-privacy {
    color: var(--wm-f4e-muted);
    font-size: 14px;
    line-height: 1.6;
}

.wm-eventform-modal-text p,
.wm-eventform-modal-privacy p {
    margin: 0 0 10px;
}

.wm-eventform-modal-text p:last-child,
.wm-eventform-modal-privacy p:last-child {
    margin-bottom: 0;
}

.wm-eventform-modal-privacy {
    margin: 2px 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--wm-f4e-border);
    border-radius: var(--wm-f4e-field-radius);
    background: var(--wm-f4e-soft);
    font-size: 12px;
}

/* Keep public modal backdrops consistent with the plugin admin. */
.wm-eventform-overlay {
    background: rgba(15, 23, 42, .54);
    -webkit-backdrop-filter: blur(5px) saturate(112%);
    backdrop-filter: blur(5px) saturate(112%);
    overscroll-behavior: contain;
}

@media (prefers-reduced-transparency: reduce) {
    .wm-eventform-overlay {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: rgba(15, 23, 42, .68);
    }
}

/* Temporarily disabled appointments remain visible but cannot be selected. */
.wm-event-form .lbl_outer_area.is-inactive {
    border-style: dashed;
    background: #f5f6f8;
    opacity: .72;
}

.wm-event-form .lbl_outer_area.is-inactive:hover {
    border-color: var(--wm-f4e-border);
    box-shadow: none;
}

.wm-event-form .lbl_outer_area.is-inactive .wm-form4events-appointment-label-text {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.wm-event-form .lbl_outer_area.is-inactive .checkmark {
    background: #eef0f3;
}

