/* ═══════════════════════════════════════════
   TIX Register Event — "Event in 2 Minuten"
   ═══════════════════════════════════════════ */

.tix-re {
    --re-primary: var(--tix-primary, #FF5500);
    --re-bg: #fff;
    --re-surface: #f7f8fa;
    --re-text: #1a1a2e;
    --re-muted: #6b7280;
    --re-border: #e5e7eb;
    --re-radius: 14px;
    --re-success: #22c55e;
    --re-error: #ef4444;
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    font-family: var(--tix-font-body, 'DM Sans'), system-ui, sans-serif;
    color: var(--re-text);
    font-size: var(--tix-body, 15px);
}

/* ── Dark Mode ── */
.tix-re-dark {
    --re-bg: #0f0f1a;
    --re-surface: #1a1a2e;
    --re-text: #f0f0f5;
    --re-muted: #9ca3af;
    --re-border: #2d2d44;
}
.tix-re-dark { background: var(--re-bg); }

/* ══════════════════════════════════════
   HEADER
   ══════════════════════════════════════ */
.tix-re-header { text-align: center; margin-bottom: 36px; }
.tix-re-title { font-size: var(--tix-h1, 28px); font-weight: 800; margin: 0 0 8px; line-height: 1.2; font-family: var(--tix-font-heading, 'Sora'), sans-serif; }
.tix-re-subtitle { font-size: var(--tix-body, 15px); color: var(--re-muted); margin: 0; }

/* ══════════════════════════════════════
   STEPPER
   ══════════════════════════════════════ */
.tix-re-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
}
.tix-re-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--tix-btn, 14px);
    font-weight: 500;
    color: var(--re-muted);
    opacity: 0.5;
    transition: all 0.3s;
}
.tix-re-step.active { opacity: 1; color: var(--re-primary); }
.tix-re-step.done { opacity: 1; color: var(--re-success); }
.tix-re-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--re-surface);
    border: 2px solid var(--re-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--tix-small, 13px);
    transition: all 0.3s;
}
.tix-re-step.active .tix-re-step-num {
    background: var(--re-primary);
    border-color: var(--re-primary);
    color: #fff;
}
.tix-re-step.done .tix-re-step-num {
    background: var(--re-success);
    border-color: var(--re-success);
    color: #fff;
}
.tix-re-step-line {
    width: 48px;
    height: 2px;
    background: var(--re-border);
    margin: 0 12px;
    transition: background 0.3s;
}
.tix-re-step-line.done { background: var(--re-success); }

/* ══════════════════════════════════════
   PANELS
   ══════════════════════════════════════ */
.tix-re-panel { animation: tixReFadeIn 0.35s ease; }
.tix-re-panel-title { font-size: var(--tix-h2, 22px); font-weight: 700; margin: 0 0 24px; text-align: center; font-family: var(--tix-font-heading, 'Sora'), sans-serif; }

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

/* ══════════════════════════════════════
   MODE SELECTOR (Step 1)
   ══════════════════════════════════════ */
.tix-re-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.tix-re-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    background: var(--re-surface);
    border: 2px solid var(--re-border);
    border-radius: var(--re-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-family: var(--tix-font-body, inherit);
    color: var(--re-text);
}
.tix-re-mode:hover { border-color: var(--re-primary); }
.tix-re-mode.active {
    border-color: var(--re-primary);
    background: color-mix(in srgb, var(--re-primary) 6%, transparent);
}
.tix-re-mode-icon { font-size: 28px; }
.tix-re-mode strong { font-size: var(--tix-btn, 14px); }
.tix-re-mode span:last-child { font-size: var(--tix-label, 12px); color: var(--re-muted); }

/* ══════════════════════════════════════
   INPUT AREAS
   ══════════════════════════════════════ */
.tix-re-input-area {
    background: var(--re-surface);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    padding: 20px;
    margin-bottom: 16px;
    animation: tixReFadeIn 0.3s ease;
}

/* ── Chat ── */
.tix-re-chat {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
}
.tix-re-chat:empty::after {
    content: "Beschreibe dein Event in ein paar Sätzen — wir helfen dir dabei.";
    color: var(--re-muted);
    font-size: var(--tix-btn, 14px);
    text-align: center;
    padding: 20px;
}
.tix-re-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: var(--tix-small, 13px);
    line-height: 1.5;
    word-break: break-word;
}
.tix-re-bubble-user {
    align-self: flex-end;
    background: var(--re-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.tix-re-bubble-ai {
    align-self: flex-start;
    background: var(--re-bg);
    border: 1px solid var(--re-border);
    border-bottom-left-radius: 4px;
}
.tix-re-chat-footer {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.tix-re-chat-footer textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--re-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: var(--tix-btn, 14px);
    font-family: var(--tix-font-body, inherit);
    background: var(--re-bg);
    color: var(--re-text);
    outline: none;
    transition: border-color 0.2s;
}
.tix-re-chat-footer textarea:focus { border-color: var(--re-primary); }
.tix-re-btn-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--re-primary);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
    font-family: var(--tix-font-body, inherit);
}
.tix-re-btn-send:hover { opacity: 0.85; }
.tix-re-btn-send:disabled { opacity: 0.4; cursor: default; }

/* ── Dropzone ── */
.tix-re-dropzone {
    border: 2px dashed var(--re-border);
    border-radius: var(--re-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.tix-re-dropzone:hover,
.tix-re-dropzone.dragover {
    border-color: var(--re-primary);
    background: color-mix(in srgb, var(--re-primary) 4%, transparent);
}
.tix-re-dropzone-text { font-size: var(--tix-body, 15px); color: var(--re-muted); display: block; }
.tix-re-dropzone-text a { color: var(--re-primary); text-decoration: none; font-weight: 600; }
.tix-re-dropzone-hint { display: block; font-size: var(--tix-label, 12px); color: var(--re-muted); opacity: 0.7; margin-top: 8px; }
#tix-re-upload-preview img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 12px;
}

/* ── URL ── */
#tix-re-url-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#tix-re-url-area .tix-re-input { width: 100%; box-sizing: border-box; }

/* ══════════════════════════════════════
   PROGRESS BAR (animated)
   ══════════════════════════════════════ */
.tix-re-status {
    margin-top: 20px;
    animation: tixReFadeIn 0.3s ease;
}
.tix-re-status-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    font-size: var(--tix-btn, 14px);
    color: var(--re-muted);
}
.tix-re-spinner {
    width: 20px; height: 20px;
    border: 3px solid var(--re-border);
    border-top-color: var(--re-primary);
    border-radius: 50%;
    animation: tixReSpin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes tixReSpin { to { transform: rotate(360deg); } }

.tix-re-progress {
    background: var(--re-surface);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    padding: 24px;
}
.tix-re-progress-bar {
    height: 6px;
    background: var(--re-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}
.tix-re-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--re-primary), color-mix(in srgb, var(--re-primary) 70%, #ff00aa));
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.tix-re-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    animation: tixReGlow 1.5s ease-in-out infinite;
}
@keyframes tixReGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.tix-re-progress-steps {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.tix-re-progress-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: var(--tix-small, 13px);
    color: var(--re-muted);
    background: transparent;
    transition: all 0.3s;
    opacity: 0.4;
}
.tix-re-progress-step.active {
    opacity: 1;
    background: color-mix(in srgb, var(--re-primary) 10%, transparent);
    color: var(--re-primary);
    font-weight: 600;
    animation: tixReStepPulse 2s ease-in-out infinite;
}
.tix-re-progress-step.done {
    opacity: 0.7;
    color: var(--re-success);
}
.tix-re-progress-step.done .tix-re-prog-icon::after { content: ' ✓'; font-size: 10px; }
.tix-re-prog-icon { font-size: 16px; }
.tix-re-prog-label { white-space: nowrap; }

@keyframes tixReStepPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ══════════════════════════════════════
   INPUTS
   ══════════════════════════════════════ */
.tix-re-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid var(--re-border);
    border-radius: 10px;
    font-size: var(--tix-body, 15px);
    font-family: var(--tix-font-body, inherit);
    background: var(--re-bg);
    color: var(--re-text);
    outline: none;
    transition: border-color 0.2s;
}
.tix-re-input:focus { border-color: var(--re-primary); }

/* ══════════════════════════════════════
   PREVIEW (Step 2)
   ══════════════════════════════════════ */
.tix-re-preview {
    background: var(--re-bg);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    padding: 24px;
    margin-bottom: 24px;
}
.tix-re-preview-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--re-border);
}
.tix-re-preview-row:last-child { border-bottom: none; }
.tix-re-preview-label {
    width: 120px;
    flex-shrink: 0;
    font-size: var(--tix-label, 12px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--re-muted);
    padding-top: 2px;
}
.tix-re-preview-value {
    flex: 1;
    font-size: var(--tix-btn, 14px);
    line-height: 1.5;
}
.tix-re-preview-value input,
.tix-re-preview-value textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: var(--tix-btn, 14px);
    font-family: var(--tix-font-body, inherit);
    background: transparent;
    color: var(--re-text);
    transition: all 0.2s;
}
.tix-re-preview-value input:hover,
.tix-re-preview-value textarea:hover {
    border-color: var(--re-border);
    background: var(--re-surface);
}
.tix-re-preview-value input:focus,
.tix-re-preview-value textarea:focus {
    border-color: var(--re-primary);
    background: var(--re-bg);
    outline: none;
}
.tix-re-preview-value textarea { resize: vertical; min-height: 60px; }
.tix-re-preview-title {
    font-size: var(--tix-h2, 22px);
    font-weight: 700;
    font-family: var(--tix-font-heading, 'Sora'), sans-serif;
    margin: 0 0 16px;
    text-align: center;
}

/* ══════════════════════════════════════
   REGISTRATION FORM (Step 3)
   ══════════════════════════════════════ */
.tix-re-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}
.tix-re-field { width: 100%; }
.tix-re-field-half { width: calc(50% - 8px); }
.tix-re-field label {
    display: block;
    font-size: var(--tix-label, 12px);
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--re-text);
}
.tix-re-legal {
    margin-bottom: 20px;
    font-size: var(--tix-small, 13px);
    color: var(--re-muted);
}
.tix-re-legal input[type="checkbox"] { margin-right: 6px; }

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.tix-re-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 28px;
    background: var(--re-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: var(--tix-btn, 14px);
    font-weight: 600;
    font-family: var(--tix-font-body, inherit);
    cursor: pointer;
    transition: opacity 0.2s;
}
.tix-re-btn-primary:hover { opacity: 0.85; }
.tix-re-btn-primary:disabled { opacity: 0.4; cursor: default; }

.tix-re-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: var(--re-surface);
    color: var(--re-muted);
    border: 1px solid var(--re-border);
    border-radius: 10px;
    font-size: var(--tix-btn, 14px);
    font-weight: 500;
    font-family: var(--tix-font-body, inherit);
    cursor: pointer;
    transition: all 0.2s;
}
.tix-re-btn-back:hover { border-color: var(--re-primary); color: var(--re-text); }

.tix-re-btn-publish {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--re-primary), color-mix(in srgb, var(--re-primary) 80%, #ff00aa));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: var(--tix-btn, 14px);
    font-weight: 700;
    font-family: var(--tix-font-body, inherit);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--re-primary) 35%, transparent);
}
.tix-re-btn-publish:hover { transform: translateY(-1px); box-shadow: 0 6px 24px color-mix(in srgb, var(--re-primary) 45%, transparent); }
.tix-re-btn-publish:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

/* ── Navigation ── */
.tix-re-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* ── Error ── */
.tix-re-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--re-error) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--re-error) 30%, transparent);
    border-radius: 10px;
    color: var(--re-error);
    font-size: var(--tix-btn, 14px);
    text-align: center;
}

/* ══════════════════════════════════════
   SUCCESS (Step 4)
   ══════════════════════════════════════ */
.tix-re-success {
    text-align: center;
    padding: 40px 20px;
    position: relative;
}
.tix-re-success-check {
    font-size: 72px;
    margin-bottom: 16px;
    animation: tixReBounce 0.6s ease;
}
@keyframes tixReBounce {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
.tix-re-success h2 { font-size: var(--tix-h2, 22px); margin: 0 0 8px; font-family: var(--tix-font-heading, 'Sora'), sans-serif; }
.tix-re-success p { color: var(--re-muted); margin: 0 0 24px; font-size: var(--tix-body, 15px); }
.tix-re-success-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ══════════════════════════════════════
   RESPONSIVE (matching event-card breakpoints)
   ══════════════════════════════════════ */

/* ── Tablet (768px) ── */
@media (max-width: 768px) {
    .tix-re { padding: 28px 18px 48px; }
    .tix-re-title { font-size: 24px; }
    .tix-re-subtitle { font-size: 14px; }
    .tix-re-panel-title { font-size: 18px; }
    .tix-re-mode strong { font-size: 13px; }
    .tix-re-mode span:last-child { font-size: 11px; }
    .tix-re-mode-icon { font-size: 24px; }
    .tix-re-mode { padding: 16px 10px; }
    .tix-re-input, .tix-re-chat-footer textarea { font-size: 13px; }
    .tix-re-bubble { font-size: 13px; }
    .tix-re-btn-primary { font-size: 14px; padding: 10px 22px; }
    .tix-re-btn-publish { font-size: 15px; padding: 12px 26px; }
    .tix-re-btn-back { font-size: 13px; padding: 10px 16px; }
    .tix-re-preview-title { font-size: 18px; }
    .tix-re-preview-value input,
    .tix-re-preview-value textarea { font-size: 13px; }
    .tix-re-field label { font-size: 12px; }
    .tix-re-legal { font-size: 12px; }
    .tix-re-success h2 { font-size: 22px; }
    .tix-re-success p { font-size: 14px; }
    .tix-re-progress-step { font-size: 12px; padding: 6px 10px; }
}

/* ── Mobile (480px) ── */
@media (max-width: 480px) {
    .tix-re { padding: 20px 14px 40px; }
    .tix-re-title { font-size: 20px; }
    .tix-re-subtitle { font-size: 13px; }
    .tix-re-panel-title { font-size: 16px; margin-bottom: 18px; }
    .tix-re-modes { grid-template-columns: 1fr; gap: 8px; }
    .tix-re-mode { flex-direction: row; padding: 14px 16px; gap: 12px; text-align: left; }
    .tix-re-mode-icon { font-size: 22px; }
    .tix-re-mode strong { font-size: 14px; }
    .tix-re-mode span:last-child { font-size: 11px; }
    .tix-re-field-half { width: 100%; }
    .tix-re-step span:not(.tix-re-step-num) { display: none; }
    .tix-re-step-num { width: 28px; height: 28px; font-size: 12px; }
    .tix-re-step-line { width: 20px; margin: 0 6px; }
    .tix-re-stepper { margin-bottom: 24px; }
    .tix-re-input-area { padding: 14px; }
    .tix-re-chat { max-height: 260px; }
    .tix-re-bubble { font-size: 13px; padding: 8px 12px; max-width: 90%; }
    .tix-re-btn-send { width: 38px; height: 38px; font-size: 16px; }
    .tix-re-dropzone { padding: 28px 16px; }
    .tix-re-dropzone-text { font-size: 14px; }
    .tix-re-input, .tix-re-chat-footer textarea { font-size: 14px; padding: 10px 12px; }
    .tix-re-preview { padding: 16px; }
    .tix-re-preview-row { flex-direction: column; gap: 4px; }
    .tix-re-preview-label { width: auto; font-size: 11px; }
    .tix-re-preview-title { font-size: 17px; }
    .tix-re-btn-primary { font-size: 14px; padding: 10px 20px; }
    .tix-re-btn-publish { font-size: 14px; padding: 12px 22px; }
    .tix-re-btn-back { font-size: 13px; }
    .tix-re-nav { flex-direction: column-reverse; gap: 8px; }
    .tix-re-nav > * { width: 100%; text-align: center; justify-content: center; }
    .tix-re-success-check { font-size: 56px; }
    .tix-re-success h2 { font-size: 20px; }
    .tix-re-success p { font-size: 13px; }
    .tix-re-success-links { flex-direction: column; }
    .tix-re-success-links a { width: 100%; text-align: center; justify-content: center; }
    .tix-re-error { font-size: 13px; padding: 10px 14px; }
    .tix-re-progress { padding: 16px; }
    .tix-re-progress-steps { flex-direction: column; gap: 2px; }
    .tix-re-progress-step { font-size: 12px; padding: 5px 10px; }
}
