/* Event Form – Create / Edit */

.iy-event-form {
    max-width: 100%;
    padding: 0;
}

/* Header: title left, action links top-right */
.iy-event-form__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.iy-event-form__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.iy-event-form__header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.iy-event-form__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #6b6b6b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.iy-event-form__action svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.iy-event-form__action:hover {
    color: var(--iy-teal, #3b6063);
    background: transparent;
    text-decoration: none;
}

/* Hide the WP page title when form is shown */
.page-template-default .entry-title,
.page-template-default .entry-header {
    display: none;
}

.iy-event-form h2 {
    font-size: 24px;
    font-weight: 700;
}

/* ── Not-eligible notice ───────────────────────────────── */

.iy-event-form__notice {
    background: #fff;
    border: 1px solid var(--bb-content-border-color, #e4e4e4);
    border-radius: 12px;
    padding: 40px 32px;
    max-width: 560px;
    text-align: center;
}

.iy-event-form__notice h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.iy-event-form__notice p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.iy-event-form__notice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--iy-teal, #3b6063);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.iy-event-form__notice-btn:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

/* ── Tabs ──────────────────────────────────────────────── */

.iy-event-form__tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--bb-content-border-color, #e4e4e4);
    margin-bottom: 24px;
}

.iy-event-form__tab,
.iy-event-form__tab:focus,
.iy-event-form__tab:active,
button.iy-event-form__tab {
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--bb-alternate-text-color, #888) !important;
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: -1px;
    box-shadow: none !important;
    outline: none !important;
}

.iy-event-form__tab:hover,
button.iy-event-form__tab:hover {
    color: var(--bb-body-text-color, #333) !important;
    background: none !important;
}

.iy-event-form__tab.is-active,
button.iy-event-form__tab.is-active {
    color: var(--iy-teal, #3b6063) !important;
    border-bottom-color: var(--iy-teal, #3b6063) !important;
    font-weight: 600 !important;
    background: none !important;
}

/* ── Panels ────────────────────────────────────────────── */

.iy-event-form__panel {
    display: none;
}

.iy-event-form__panel.is-active {
    display: block;
}

/* Message */
.iy-event-form__message {
    padding: 12px 16px;
    border-radius: 12px; /* library input/tag radius */
    margin-bottom: 16px;
    font-size: 14px;
}

.iy-event-form__message--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.iy-event-form__message--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Fields */
.iy-event-form__field {
    margin-bottom: 20px;
}

.iy-event-form__field > label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    color: #333;
}

.iy-event-form__field input[type="text"],
.iy-event-form__field input[type="url"],
.iy-event-form__field input[type="email"],
.iy-event-form__field input[type="tel"],
.iy-event-form__field input[type="date"],
.iy-event-form__field input[type="time"],
.iy-event-form__field select,
.iy-event-form__field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* library input/tag radius */
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.iy-event-form__field input:focus,
.iy-event-form__field select:focus,
.iy-event-form__field textarea:focus {
    outline: none;
    border-color: var(--iy-teal, #3B6063);
    box-shadow: 0 0 0 2px rgba(59, 96, 99, 0.1);
}

.iy-event-form__field textarea {
    resize: vertical;
}

/* Row (side-by-side fields) */
.iy-event-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Online toggle */
.iy-event-form__toggle {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
}

.iy-event-form__toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Upload area */
.iy-event-form__upload {
    border: 2px dashed #ddd;
    border-radius: 12px; /* library input/tag radius */
    padding: 24px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

.iy-event-form__upload:hover {
    border-color: var(--iy-teal, #3B6063);
}

.iy-event-form__upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.iy-event-form__upload span {
    font-size: 14px;
    color: #888;
}

.iy-event-form__preview {
    margin-top: 12px;
}

.iy-event-form__preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 12px; /* library input/tag radius */
    object-fit: cover;
}

/* Hint text */
.iy-event-form__hint {
    font-size: 12px;
    color: #888;
    margin: 6px 0 0 0;
}

/* Actions (wizard footer): cancel left, nav buttons right */
.iy-event-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.iy-event-form__nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iy-event-form__next-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--iy-teal, #3B6063);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.iy-event-form__next-step:hover {
    opacity: 0.9;
}

.iy-event-form__back-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}

.iy-event-form__back-step:hover {
    border-color: #999;
}

/* Review step summary */
.iy-event-form__review-intro {
    font-size: 14px;
    color: #6b6b6b;
    margin: 0 0 16px;
}

.iy-event-form__review {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 0;
    margin: 0;
    background: #fff;
    border: 1px solid var(--bb-content-border-color, #e4e4e4);
    border-radius: 12px;
    overflow: hidden;
}

.iy-event-form__review dt {
    padding: 12px 16px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #6b6b6b;
    border-bottom: 1px solid #f0f0f0;
}

.iy-event-form__review dd {
    padding: 12px 16px;
    margin: 0;
    font-size: 14px;
    color: #1c2b2c;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
}

.iy-event-form__review dt:last-of-type,
.iy-event-form__review dd:last-of-type {
    border-bottom: none;
}

.iy-event-form__cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 1px solid #ddd;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: border-color 0.2s;
}

.iy-event-form__cancel:hover {
    border-color: #999;
    color: #333;
    text-decoration: none;
}

.iy-event-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--iy-teal, #3B6063);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.iy-event-form__submit:hover {
    opacity: 0.9;
}

.iy-event-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── System cards (Inside Flow / Inside Yoga) ──────────── */

.iy-event-form__syscards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.iy-event-form__syscard {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* library input/tag radius */
    background: #fff;
    cursor: pointer;
    margin: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.iy-event-form__syscard input[type="radio"] {
    margin: 2px 0 0;
    accent-color: var(--iy-teal, #3B6063);
    flex-shrink: 0;
}

.iy-event-form__syscard:hover {
    border-color: #c9c9c9;
}

.iy-event-form__syscard.is-active {
    border-color: var(--iy-teal, #3B6063);
    box-shadow: 0 0 0 2px rgba(59, 96, 99, 0.12);
}

/* CSS-only fallback (separate rule: an unsupported :has() must not drop the
   .is-active rule above). */
.iy-event-form__syscard:has(input:checked) {
    border-color: var(--iy-teal, #3B6063);
    box-shadow: 0 0 0 2px rgba(59, 96, 99, 0.12);
}

.iy-event-form__syscard-body {
    display: block;
}

.iy-event-form__syscard-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1c2b2c;
}

.iy-event-form__syscard-desc {
    display: block;
    font-size: 12px;
    color: #6b6b6b;
}

.iy-event-form__field select:disabled {
    background: #f7f7f7;
    color: #9a9a9a;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .iy-event-form__syscards {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .iy-event-form {
        padding: 16px;
    }

    .iy-event-form__row {
        grid-template-columns: 1fr;
    }

    .iy-event-form__actions {
        flex-direction: column-reverse;
    }

    .iy-event-form__cancel,
    .iy-event-form__submit {
        width: 100%;
        text-align: center;
    }
}


/* Registration gate: grayed out until the checkbox above enables it */
.iy-event-form__registration.is-off {
  opacity: 0.45;
  pointer-events: none;
}

.iy-event-form__hint {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--iy-ink-soft, #5a6c6a);
}


/* The gate checkbox is a choice row, not a section label — undo the
   uppercase field-label treatment inside this field. */
.iy-event-form__field .iy-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--iy-ink, #1d2b2a);
  cursor: pointer;
}

.iy-event-form__field .iy-choice input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--iy-teal, #3b6063);
  flex-shrink: 0;
}

/* ── Phones (≤ 640px, ticket 3 mobile pass 2026-10-12) ─────────────────────
   - Wizard tabs: four equal columns instead of a row that ran ~90px past the
     screen edge ("Review" was cut off and tapping it scrolled the page sideways).
   - Review summary: label above value; the 140px label column left ~40px for
     the values ("Insid / e / Flow").
   - Footer: Back / Next / Submit share one full-width row, 44px high.
   - Fields 16px so iOS does not zoom in on focus. */
@media (max-width: 640px) {
    .iy-event-form__action {
        min-height: 44px;
        font-size: 14px;
    }

    .iy-event-form__tabs {
        margin-bottom: 20px;
    }

    .iy-event-form__tab,
    .iy-event-form__tab:focus,
    .iy-event-form__tab:active,
    button.iy-event-form__tab {
        flex: 1 1 0;
        min-width: 0;
        min-height: 48px;
        padding: 8px 4px !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .iy-event-form__field > label {
        font-size: 13px;
    }

    .iy-event-form__field input[type="text"],
    .iy-event-form__field input[type="url"],
    .iy-event-form__field input[type="email"],
    .iy-event-form__field input[type="tel"],
    .iy-event-form__field input[type="date"],
    .iy-event-form__field input[type="time"],
    .iy-event-form__field select,
    .iy-event-form__field textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .iy-event-form__hint,
    .iy-event-form__syscard-desc {
        font-size: 14px;
    }

    .iy-event-form__review {
        grid-template-columns: 1fr;
    }

    .iy-event-form__review dt {
        padding: 12px 16px 2px;
        border-bottom: none;
    }

    .iy-event-form__review dd {
        padding: 0 16px 12px;
    }

    .iy-event-form__actions {
        align-items: stretch;
    }

    .iy-event-form__nav {
        width: 100%;
    }

    .iy-event-form__nav > button {
        flex: 1 1 0;
        min-height: 44px;
        white-space: nowrap;
    }

    .iy-event-form__cancel {
        min-height: 44px;
    }
}
