/*
 * form.cmleteam.com — campaign hub
 *
 * Page-scoped: pulled in by layouts/campaign.blade.php, never loaded on the
 * main site, so it is free to add its own primitives without touching
 * site.css. Built from the same design tokens as site.css (--bg, --card,
 * --accent, …). This domain deliberately skips the public site's fixed
 * nav-bar and footer (layouts/campaign.blade.php instead) — just the
 * wordmark, centered, so campaign pages read as their own focused space.
 */

/* Sits at the top of the sidebar card (campaign-sidebar), not on its own —
   see the comment there for why it moved off a standalone header bar. */
.campaign-top-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.campaign-top-logo { display: block; }
.campaign-top-logo img { height: 26px; width: auto; display: block; }

.campaign-hub-section {
    /* No overflow:hidden here on purpose — this section has no oversized
       blurred glow shapes to clip (unlike .hero), and clipping would also
       break the sidebar's position:sticky below, since sticky positioning
       stops working inside a clipped/scroll-affecting ancestor. The pattern
       layers don't need it either: inset:0 already bounds them exactly to
       this element's own box. */
    position: relative;
    padding: 64px 0 100px;
    min-height: 100vh;
}

/* Same convention as .section > .wrap in site.css: keeps real content above
   the pattern/gradient pseudo-elements below, since this isn't a .section.
   The pseudo-elements get an explicit z-index too, rather than relying on
   .wrap's stacking context alone to outrank an implicit "auto" — belt and
   braces, since this is exactly the layer that must never sit on top. */
.campaign-hub-section.section-pattern::before,
.campaign-hub-section.section-pattern::after {
    z-index: 0;
}

.campaign-hub-section > .wrap {
    position: relative;
    z-index: 1;
}

.campaign-hub {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 860px) {
    .campaign-hub { grid-template-columns: 1fr; }
}

/* ---------- sidebar ---------- */

.campaign-sidebar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    /* Same top padding as .campaign-main, so the logo and the "Kampanyalar"
       heading start at the same height as the main card's own content. */
    padding: 40px 20px;
    position: sticky;
    top: 24px;
}

@media (max-width: 860px) {
    .campaign-sidebar { position: static; }
}

.campaign-sidebar-title {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.campaign-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.campaign-sidebar-link:hover { background: var(--card-hover); }

.campaign-sidebar-link.is-active {
    border-color: var(--border-hover);
    background: rgba(var(--accent-rgb), 0.1);
}

.campaign-sidebar-name {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text);
}

.campaign-badge {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 100px;
    white-space: nowrap;
}

.campaign-badge.is-open { color: #34D399; background: rgba(52, 211, 153, 0.12); }
.campaign-badge.is-closed { color: var(--muted); background: rgba(255, 255, 255, 0.06); }

.campaign-sidebar-empty { color: var(--muted); font-size: 14px; }

/* ---------- main column ---------- */

.campaign-main {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}

@media (max-width: 560px) {
    .campaign-main { padding: 28px 20px; }
}

.campaign-main h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.campaign-main .lead { margin-bottom: 28px; }

.campaign-note {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14.5px;
    border: 1px solid;
}

.campaign-note.ok { color: #34D399; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.campaign-note.error { color: #F87171; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }

/* ---------- form ---------- */

.campaign-form { display: grid; gap: 20px; }

.form-row { display: grid; gap: 8px; }

.form-row label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-2);
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row input[type="url"],
.form-row textarea {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: var(--accent); }

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

.field-error {
    color: #F87171;
    font-size: 13px;
}

.hp-field { position: absolute; left: -9999px; }

/* ---------- consents ---------- */

.consent-list { display: grid; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }

.consent-item { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

/* Clicking anywhere here — the box or the text — opens the consent modal;
   it's the only trigger now, there's no separate "review" button. */
.consent-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    color: var(--text-2);
    flex: 1 1 240px;
    cursor: pointer;
}

.consent-check:hover { color: var(--text); }
.consent-check:hover span { text-decoration: underline; text-underline-offset: 3px; }

.consent-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    pointer-events: none;
}

.consent-check input[type="checkbox"]:disabled { opacity: 0.4; }

/* ---------- OTP step ---------- */

.otp-input {
    width: 100%;
    max-width: 260px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 10px;
    text-align: center;
}

.otp-input:focus { outline: none; border-color: var(--accent); }

.resend-form { margin-top: 16px; }

/* ---------- consent modal (no Bootstrap on the public site) ---------- */

.consent-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.consent-modal[hidden] { display: none; }

.consent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 3, 10, 0.72);
}

.consent-modal-dialog {
    position: relative;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    padding: 32px;
}

.consent-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
}

.consent-modal-content { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.consent-modal-content h3 { color: var(--text); margin-bottom: 16px; }

.consent-modal-footer { margin-top: 24px; text-align: right; }

/* ---------- closed notice ---------- */

.campaign-closed { color: var(--text-2); }
.campaign-closed h2 { color: var(--text); margin-bottom: 12px; }
