/* ── Ironhorse Anmeldung – Public Form ─────────────────────────────────── */

:root {
    --ian-bg:       #0e0e0e;
    --ian-surface:  #1a1a1a;
    --ian-border:   #2a2a2a;
    --ian-text:     #f0f0f0;
    --ian-muted:    #888;
    --ian-accent:   #e94560;
    --ian-success:  #50c878;
    --ian-radius:   8px;
}

.ian-page {
    min-height: 60vh;
    padding: 40px 16px 80px;
    background: var(--ian-bg);
    color: var(--ian-text);
}

.ian-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--ian-surface);
    border: 1px solid var(--ian-border);
    border-radius: var(--ian-radius);
    padding: 36px 40px;
    color: var(--ian-text);
}

@media (max-width: 600px) {
    .ian-card {
        padding: 24px 20px;
    }
}

/* ── Slot Header ─────────────────────────────────────────────────────────── */

.ian-slot-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ian-border);
}

.ian-stage-badge {
    display: inline-block;
    background: var(--ian-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.ian-slot-title {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--ian-text);
    line-height: 1.25;
}

.ian-slot-meta {
    margin: 0;
    font-size: .9rem;
    color: var(--ian-muted);
}

/* ── Success ─────────────────────────────────────────────────────────────── */

.ian-success {
    text-align: center;
    padding: 24px 0;
}

.ian-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ian-success);
    color: #000;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.ian-success h2 {
    margin: 0 0 8px;
    color: var(--ian-text);
    font-size: 1.4rem;
}

.ian-success p {
    color: var(--ian-muted);
    margin: 0;
}

/* ── Gate / Closed ───────────────────────────────────────────────────────── */

.ian-gate {
    padding: 20px;
    border: 1px solid var(--ian-border);
    border-left: 4px solid var(--ian-accent);
    border-radius: var(--ian-radius);
    background: rgba(233,69,96,.08);
}

.ian-gate-message {
    margin: 0;
    color: var(--ian-text);
    font-size: 1rem;
}

/* ── Error ───────────────────────────────────────────────────────────────── */

.ian-error {
    padding: 12px 16px;
    border: 1px solid var(--ian-accent);
    border-radius: var(--ian-radius);
    background: rgba(233,69,96,.1);
    margin-bottom: 20px;
}

.ian-error p {
    margin: 0;
    color: var(--ian-accent);
    font-size: .9rem;
}

/* ── Spots Left ──────────────────────────────────────────────────────────── */

.ian-spots-left {
    color: var(--ian-muted);
    font-size: .85rem;
    margin-bottom: 20px;
}

.ian-spots-left strong {
    color: var(--ian-text);
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.ian-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ian-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.ian-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ian-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ian-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ian-req {
    color: var(--ian-accent);
}

.ian-field input[type="text"],
.ian-field input[type="email"],
.ian-field input[type="number"],
.ian-field select,
.ian-field textarea {
    width: 100%;
    background: var(--ian-bg);
    border: 1px solid var(--ian-border);
    border-radius: var(--ian-radius);
    color: var(--ian-text);
    font-size: .95rem;
    padding: 10px 14px;
    box-sizing: border-box;
    transition: border-color .15s;
    font-family: inherit;
}

.ian-field input:focus,
.ian-field select:focus,
.ian-field textarea:focus {
    outline: none;
    border-color: var(--ian-accent);
    box-shadow: 0 0 0 2px rgba(233,69,96,.15);
}

.ian-field textarea {
    resize: vertical;
    min-height: 90px;
}

.ian-field select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.ian-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--ian-text);
    font-size: .95rem;
    padding: 4px 0;
}

.ian-radio input[type="radio"] {
    accent-color: var(--ian-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ── Submit ──────────────────────────────────────────────────────────────── */

.ian-submit {
    background: var(--ian-accent);
    color: #fff;
    border: none;
    border-radius: var(--ian-radius);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 14px 28px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    align-self: flex-start;
    font-family: inherit;
    margin-top: 4px;
}

.ian-submit:hover {
    background: #d63355;
    transform: translateY(-1px);
}

.ian-submit:active {
    transform: translateY(0);
}

/* ── Privacy Note ────────────────────────────────────────────────────────── */

.ian-privacy {
    font-size: .78rem;
    color: var(--ian-muted);
    margin: 0;
}

/* ── Light Mode (html.its-light) ─────────────────────────────────────────── */

html.its-light .ian-page {
    background: #f5f5f5;
    color: #1a1a1a;
}

html.its-light .ian-card {
    background: #fff;
    border-color: #e0e0e0;
    color: #1a1a1a;
}

html.its-light .ian-slot-title {
    color: #1a1a1a;
}

html.its-light .ian-field input,
html.its-light .ian-field select,
html.its-light .ian-field textarea {
    background: #fff;
    border-color: #ccc;
    color: #1a1a1a;
}

html.its-light .ian-field input:focus,
html.its-light .ian-field select:focus,
html.its-light .ian-field textarea:focus {
    border-color: var(--ian-accent);
}

html.its-light .ian-radio {
    color: #1a1a1a;
}

html.its-light .ian-slot-meta {
    color: #555;
}

html.its-light .ian-field label {
    color: #555;
}

html.its-light .ian-success h2 {
    color: #1a1a1a;
}

html.its-light .ian-success p {
    color: #555;
}

html.its-light .ian-spots-left {
    color: #555;
}

html.its-light .ian-spots-left strong {
    color: #1a1a1a;
}

html.its-light .ian-privacy {
    color: #888;
}

html.its-light .ian-gate-message {
    color: #1a1a1a;
}

/* ── Placeholder ─────────────────────────────────────────────────────────── */

.ian-field input::placeholder,
.ian-field textarea::placeholder {
    color: #555;
    opacity: 1;
}

html.its-light .ian-field input::placeholder,
html.its-light .ian-field textarea::placeholder {
    color: #aaa;
    opacity: 1;
}

/* ── Autofill Fix ────────────────────────────────────────────────────────── */

.ian-field input:-webkit-autofill,
.ian-field input:-webkit-autofill:hover,
.ian-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #0e0e0e inset;
    -webkit-text-fill-color: #f0f0f0;
    caret-color: #f0f0f0;
}

html.its-light .ian-field input:-webkit-autofill,
html.its-light .ian-field input:-webkit-autofill:hover,
html.its-light .ian-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #1a1a1a;
    caret-color: #1a1a1a;
}
