/*
 * Additions on top of app.css (the compiled Tailwind build of the old React
 * site, used as is). Only for things the old build had no classes for.
 */

html { scroll-behavior: smooth; }
#categories { scroll-margin-top: 7rem; }

/* Language switcher in the blue top bar */
.lang-switch a { border-radius: 9999px; }
.lang-switch a.is-active { background: rgb(255 255 255 / 0.2); opacity: 1; }

/* Home "about" paragraph: the bold company name */
.about-lead strong { color: rgb(15 23 42); }

/* FAQ: <details> instead of the Radix accordion */
.faq summary { list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq[open] .faq-chevron { transform: rotate(180deg); }

/* Contact form */
.radio { width: 1rem; height: 1rem; accent-color: hsl(var(--primary)); flex-shrink: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy-note a { text-decoration: underline; }
[aria-invalid="true"] { border-color: hsl(var(--destructive)); }

/* Privacy and terms: the old site used "prose" classes the build didn't
   contain, which left the text without any spacing. */
.legal p { margin-bottom: 1em; }
.legal h3 { margin: 1.75em 0 0.5em; font-weight: 600; color: rgb(15 23 42); font-size: 1.125rem; }
.legal strong { color: rgb(15 23 42); }
.legal a { color: hsl(var(--primary)); text-decoration: underline; }

/* Utilities the old build didn't contain (form error box, admin) */
.bg-red-50 { background-color: rgb(254 242 242); }
.border-red-200 { border-color: rgb(254 202 202); }
.text-red-600 { color: rgb(220 38 38); }
.text-slate-700 { color: rgb(51 65 85); }
@media (min-width: 768px) {
    .md\:items-center { align-items: center; }
    .md\:items-start { align-items: flex-start; }
}

/* Admin: submissions table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; line-height: 1.35; color: rgb(51 65 85); }
.admin-table th { text-align: left; font-weight: 600; color: rgb(100 116 139); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.75rem; border-bottom: 1px solid rgb(226 232 240); background: rgb(248 250 252); white-space: nowrap; }
.admin-table td { padding: 0.625rem 0.75rem; vertical-align: top; }
.admin-row + .admin-row .admin-summary td { border-top: 1px solid rgb(241 245 249); }
.admin-summary { cursor: pointer; }
.admin-summary:hover, .admin-summary[aria-expanded="true"] { background: rgb(248 250 252); }
.admin-summary:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: -2px; }
.admin-message { min-width: 14rem; max-width: 26rem; }
.admin-message span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-detail td { background: rgb(248 250 252); padding: 0.5rem 0.75rem 1.25rem; }
.admin-label { font-weight: 600; color: rgb(15 23 42); margin-bottom: 0.25rem; }
.admin-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.75rem; }
.admin-facts dt { font-weight: 600; color: rgb(15 23 42); }
.is-ok { color: rgb(22 163 74); }
.is-failed { color: rgb(220 38 38); }
.is-muted { color: rgb(148 163 184); }
.break-all { word-break: break-all; }

/* Cookie banner (templates/partials/cookie-banner.php) */
.cookie-banner { position: fixed; inset: auto 0 0 0; z-index: 60; padding: 16px; pointer-events: none; }
.cookie-banner[hidden] { display: none; }
.cookie-card { pointer-events: auto; max-width: 44rem; margin: 0 auto; background: #fff; border: 1px solid rgb(226 232 240); border-radius: 0.75rem; box-shadow: 0 10px 30px rgb(15 23 42 / 0.15); padding: 1.25rem 1.5rem; max-height: calc(100vh - 32px); overflow-y: auto; }
.cookie-options { display: grid; gap: 0.75rem; margin-top: 1rem; }
.cookie-options[hidden] { display: none; }
.cookie-option { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.875rem; color: rgb(71 85 105); cursor: pointer; }
.cookie-option strong { color: rgb(15 23 42); }
.cookie-option input { margin-top: 0.2rem; width: 1rem; height: 1rem; accent-color: hsl(var(--primary)); flex-shrink: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.cookie-actions [hidden] { display: none; }
@media (max-width: 480px) { .cookie-actions > * { flex: 1 1 100%; } }

/* Tables in the privacy policy (cookie list) */
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 0.875rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid rgb(226 232 240); }
.legal th { color: rgb(15 23 42); font-weight: 600; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1em; }
.legal li { margin-bottom: 0.4em; }
.legal-table-wrap { overflow-x: auto; }
.underline { text-decoration-line: underline; }
