/**
 * Open Day Events – shortcode styles
 */

/* ── Wrapper ─────────────────────────────────────────────── */
.atc-ode-wrap {
    font-family: inherit;
    color: inherit;
}

.atc-ode-empty {
    font-style: italic;
    color: #666;
    margin: 1em 0;
}

/* ── Event list ──────────────────────────────────────────── */
.atc-ode-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.atc-ode-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    background: #fff;
    border: 1px solid #d8dde6;
    border-left: 4px solid #0d2560;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: left;
    position: relative;
}

.atc-ode-row--registered {
    border-left-color: #2d8a4e;
    background: #f4faf6;
}

.atc-ode-row--unavailable {
    opacity: 0.7;
}

/* ── Row body ────────────────────────────────────────────── */
.atc-ode-row__body {
    flex: 1;
    min-width: 0;
}

.atc-ode-row__title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.atc-ode-row__title {
    font-size: 16px;
    font-weight: 700;
    color: #0d2560;
}

.atc-ode-row__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
}

.atc-ode-meta__item {
    font-size: 13px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 5px;
}

.atc-ode-meta__label {
    font-weight: 600;
    color: #0d2560;
}

.atc-ode-capacity--full {
    color: #c0392b;
    font-weight: 600;
}

/* ── Row actions ─────────────────────────────────────────── */
.atc-ode-row__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Badges ──────────────────────────────────────────────── */
.atc-ode-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.atc-ode-badge--registered {
    background: #2d8a4e;
    color: #fff;
}

.atc-ode-badge--full {
    background: #c0392b;
    color: #fff;
}

.atc-ode-badge--closed {
    background: #7f8c9a;
    color: #fff;
}

/* ── Buttons ─────────────────────────────────────────────── */
.atc-ode-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, opacity 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}
.atc-ode-btn:not(.atc-ode-btn--cancel, .atc-ode-btn--unregister){
    background-color: #4AAA3A !important;
}

.atc-ode-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.atc-ode-btn--register {
    background: #c8a84b;
    color: #fff;
}

.atc-ode-btn--register:hover:not(:disabled) {
    background: #b5923c;
}

.atc-ode-btn--unregister {
    background: transparent;
    color: #c0392b;
    border: 1px solid #c0392b;
    padding: 6px 14px;
    font-size: 12px;
}

.atc-ode-btn--unregister:hover:not(:disabled) {
    background: #c0392b;
    color: #fff;
}

/* ── Modal overlay ───────────────────────────────────────── */
.atc-ode-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.atc-ode-modal.active {
    display: flex;
}

.atc-ode-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 37, 96, 0.7);
    cursor: pointer;
}

/* ── Modal dialog ────────────────────────────────────────── */
.atc-ode-modal__dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 6px;
    padding: 36px 40px 32px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    max-height: 90vh;
    overflow-y: auto;
}

.atc-ode-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}

.atc-ode-modal__close:hover {
    color: #0d2560;
    background: #f0f2f7;
}

.atc-ode-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: #0d2560 !important;
    margin: 0 0 6px;
    padding: 0;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
}

.atc-ode-modal__event-name {
    font-size: 14px;
    color: #555;
    margin: 6px 0 20px;
    font-style: italic;
    text-align: left;
}

/* ── Form ────────────────────────────────────────────────── */
.atc-ode-form__row {
    display: flex;
    gap: 16px;
}

.atc-ode-form__row .atc-ode-form__group {
    flex: 1;
    min-width: 0;
}

.atc-ode-form__group {
    margin-bottom: 16px;
}

.atc-ode-form__consent {
    margin-bottom: 12px;
}

.atc-ode-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.atc-ode-consent-row input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0d2560;
}

.atc-ode-consent-row label {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    line-height: 1.5;
    margin-bottom: 0;
}

.atc-ode-consent-hint {
    display: block;
    font-size: 11px;
    color: #888;
    margin-left: 26px;
    font-style: italic;
}

.atc-ode-form__group label, .atc-ode-form__group label a {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    margin-top: 0 !important;
    line-height: normal !important;
    padding: 0 !important;
}
.atc-ode-form__group label{
    color: #0d2560 !important;
}

.atc-ode-required {
    color: #c0392b;
}

.atc-ode-form__group input {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c5cad6;
    border-radius: 3px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fafbfc;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.atc-ode-form__group input:focus {
    outline: none;
    border-color: #0d2560;
    background: #fff;
}

.atc-ode-input--locked {
    background: #f0f2f7 !important;
    color: #666;
    cursor: not-allowed;
}

.atc-ode-form__error {
    background: #fdf0f0;
    color: #c0392b;
    border: 1px solid #f5c6c6;
    border-radius: 3px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.atc-ode-form__actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
    justify-content: center;
}

.atc-ode-btn--submit {
    background: #0d2560;
    color: #fff;
    padding: 10px 24px;
    font-size: 14px;
}

.atc-ode-btn--submit:hover:not(:disabled) {
    background: #1a3a80;
}

.atc-ode-btn--cancel {
    background: transparent;
    color: #555;
    border: 1px solid #bbb;
    padding: 10px 18px;
    font-size: 14px;
}

.atc-ode-btn--cancel:hover {
    background: #f0f2f7;
    color: #333;
}

/* ── Success message ─────────────────────────────────────── */
.atc-ode-success {
    text-align: center;
    padding: 24px 0 8px;
}

.atc-ode-success p {
    font-size: 16px;
    font-weight: 600;
    color: #2d8a4e;
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .atc-ode-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .atc-ode-row__actions {
        align-items: flex-start;
        width: 100%;
    }

    .atc-ode-form__row {
        flex-direction: column;
        gap: 0;
    }

    .atc-ode-modal__dialog {
        padding: 28px 20px 24px;
        margin: 12px;
        max-width: calc(100% - 24px);
    }
}
