/* Contact page (/support/<app>/): banner, quick answers and the form layout.
 *
 * Loaded only by support/public/new_ticket.html, after support_public.css, so
 * the ticket and thanks pages are untouched. Mobile first: the base rules are
 * for phones, the min-width queries widen them. Bump ?v= in new_ticket.html
 * whenever this file changes, so browsers fetch the new copy.
 */

/* === banner: "How can we help you?" === */
.help-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 20px 20px 24px;
    border-radius: var(--radius-card);
    color: #fff;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(156, 199, 61, 0.42) 0%, rgba(156, 199, 61, 0) 58%),
        linear-gradient(140deg, #1F2622 0%, #2C3923 55%, #3E5019 100%);
    box-shadow: var(--shadow-card);
}
.help-hero .ticket-header {
    gap: 12px;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}
.help-hero .app-avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}
.help-hero .ticket-app-name { color: #fff; font-size: 1rem; }
.help-hero-eyebrow {
    margin: 2px 0 0;
    color: var(--brand-primary);
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.help-hero-title {
    margin: 0;
    color: #fff;
    font-size: 1.875rem; font-weight: 800;
    line-height: 1.15; letter-spacing: -0.02em;
}
.help-hero-lead {
    margin: 10px 0 0;
    max-width: 34em;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* === quick answers === */
.help-topics {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 20px;
}
.help-topics-title {
    margin: 0 4px 2px;
    color: var(--muted);
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.help-item {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.help-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: var(--tap-min);
    padding: 12px 16px;
    color: var(--ink);
    font-weight: 600; line-height: 1.35;
    list-style: none;
    cursor: pointer;
    border-radius: 12px;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after {
    content: '';
    flex-shrink: 0;
    width: 8px; height: 8px;
    margin: -4px 4px 0 0;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.15s;
}
.help-item[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.help-item summary:hover { background: var(--brand-primary-pale); }
.help-item summary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-primary-light), 0 0 0 1px var(--brand-primary) inset;
}
.help-answer {
    padding: 4px 16px 16px;
    color: var(--ink-soft);
    font-size: 0.95rem;
}
.help-answer p { margin: 0 0 12px; }
.help-answer ol { margin: 0 0 12px; padding-left: 1.4rem; }
.help-answer li { margin-bottom: 6px; padding-left: 2px; }
.help-answer strong { color: var(--ink); }
.help-note {
    padding: 10px 12px;
    background: var(--brand-primary-pale);
    border-radius: 8px;
    font-size: 0.9rem;
}
.help-answer .help-note:last-child { margin-bottom: 0; }

/* === "How to Contact Us?" + the form === */
.contact-intro {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}
.contact-title {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em;
}
.contact-intro p { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.95rem; }
.contact-intro p:last-child { margin-bottom: 0; }

/* Device: a plain fieldset whose label lines up with "Topic". Django 5 renders
   the radios in <div>s (not a <ul>), so the choices are laid out here as two
   equal buttons the height of the Topic select. */
.contact-card .field-radio {
    min-width: 0;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}
.contact-card .field-radio > legend { float: left; width: 100%; padding: 0; }
.contact-card .field-radio > legend + * { clear: both; }
.contact-card .field-radio > div {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.contact-card .field-radio label {
    display: flex; align-items: center; gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    transition: border-color 0.15s, background 0.15s;
}
.contact-card .field-radio label:has(input:checked) {
    background: var(--brand-primary-pale);
    border-color: var(--brand-primary);
    box-shadow: inset 0 0 0 1px var(--brand-primary);
}
.contact-card .field-radio label:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--brand-primary-light);
}
.contact-card .field-radio input[type=radio] {
    width: 18px; height: 18px; margin: 0;
    accent-color: var(--brand-accent);
}
.contact-card .field select { min-height: 48px; }

/* Photo / video: the file button on its own row, the rules in small print under it. */
.contact-card .field > span em { color: var(--muted); font-weight: 500; }
.contact-card .attachment-input {
    display: block;
    width: 100%;
    padding: 10px;
    color: var(--muted);
    font: inherit; font-size: 0.9rem;
    background: var(--brand-primary-pale);
    border: 1px dashed var(--border);
    border-radius: var(--radius-input);
    cursor: pointer;
}
.contact-card .attachment-input::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    color: var(--ink);
    font: inherit; font-weight: 600;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}
.contact-card .field-hint {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.8rem; line-height: 1.5;
}

/* Send: full width on a phone, a normal button from tablet up. */
.contact-card form > .btn-primary { width: 100%; margin-top: 4px; }

@media (min-width: 541px) {
    .help-hero { padding: 32px 36px 36px; }
    .help-hero-title { font-size: 2.5rem; }
    .help-hero-lead { font-size: 1.05rem; }
    .contact-card form > .btn-primary { width: auto; min-width: 160px; }
}

/* In-app WebViews (?embed=1) drop the page chrome and side gutters. */
body.is-embed .help-hero { border-radius: 0; }
body.is-embed .help-topics { padding: 0 12px; }
