/* assets/css/policy.css
   Shared across all policy pages. */

.pol-hero-glow {
    position: absolute;
    top: -6rem; left: 50%;
    transform: translateX(-50%);
    width: 46rem; height: 26rem;
    background: radial-gradient(ellipse at center, rgba(79,70,229,0.12) 0%, transparent 65%);
    z-index: 0; pointer-events: none;
}
.dark .pol-hero-glow { background: radial-gradient(ellipse at center, rgba(99,102,241,0.20) 0%, transparent 65%); }

/* Table of contents */
.pol-toc-link {
    display: block;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #64748b;
    padding: 0.35rem 0.6rem;
    border-left: 2px solid transparent;
    border-radius: 0 0.375rem 0.375rem 0;
    transition: all var(--transition-base);
}
.pol-toc-link:hover { color: var(--color-primary); background: #f8fafc; }
.pol-toc-link.active { color: var(--color-primary); border-left-color: var(--color-primary); background: #eef2ff; font-weight: 600; }
.dark .pol-toc-link { color: #94a3b8; }
.dark .pol-toc-link:hover { color: #a5b4fc; background: #0f172a; }
.dark .pol-toc-link.active { color: #a5b4fc; background: rgba(99,102,241,0.12); border-left-color: #6366f1; }

/* Sections */
.pol-section { padding: 1.75rem 0; border-bottom: 1px solid #f1f5f9; }
.dark .pol-section { border-bottom-color: #1e293b; }
.pol-section:first-child { padding-top: 0; }

/* Prose */
.policy-prose h2 {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 1.4rem; font-weight: 800; color: #0f172a;
    margin: 0 0 1rem 0; scroll-margin-top: 7rem;
}
.dark .policy-prose h2 { color: #f1f5f9; }
.pol-num {
    flex-shrink: 0;
    width: 2rem; height: 2rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg,#4f46e5,#7c3aed);
    color: #fff; font-size: 0.9rem; font-weight: 700;
    border-radius: 0.6rem;
}
.policy-prose h3 { font-size: 1.05rem; font-weight: 700; color: #1e293b; margin: 1.5rem 0 0.5rem; }
.dark .policy-prose h3 { color: #e2e8f0; }
.policy-prose p { color: #475569; line-height: 1.7; margin: 0 0 1rem; }
.dark .policy-prose p { color: #94a3b8; }
.policy-prose ul { margin: 0 0 1rem; padding-left: 1.25rem; list-style: disc; }
.policy-prose li { color: #475569; line-height: 1.7; margin-bottom: 0.4rem; }
.dark .policy-prose li { color: #94a3b8; }
.policy-prose strong { color: #0f172a; font-weight: 600; }
.dark .policy-prose strong { color: #e2e8f0; }
.policy-prose code { background: #f1f5f9; padding: 0.1rem 0.4rem; border-radius: 0.3rem; font-size: 0.9em; color: #4f46e5; }
.dark .policy-prose code { background: #1e293b; color: #a5b4fc; }

/* Callout boxes */
.pol-callout {
    display: flex; gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 0.85rem;
    margin: 1.25rem 0;
    font-size: 0.9rem; line-height: 1.6;
}
.pol-callout i { font-size: 1.1rem; margin-top: 0.1rem; flex-shrink: 0; }
.pol-callout p { margin: 0 !important; }
.pol-note      { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.pol-important { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.pol-tip       { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.pol-danger    { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.pol-note i{color:#3b82f6}.pol-important i{color:#f59e0b}.pol-tip i{color:#22c55e}.pol-danger i{color:#ef4444}
.dark .pol-note{background:rgba(59,130,246,.1);border-color:rgba(59,130,246,.25);color:#93c5fd}
.dark .pol-important{background:rgba(245,158,11,.1);border-color:rgba(245,158,11,.25);color:#fcd34d}
.dark .pol-tip{background:rgba(34,197,94,.1);border-color:rgba(34,197,94,.25);color:#86efac}
.dark .pol-danger{background:rgba(239,68,68,.1);border-color:rgba(239,68,68,.25);color:#fca5a5}
.pol-callout strong { color: inherit !important; }

/* Back to top */
.pol-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 40;
    width: 2.75rem; height: 2.75rem; border-radius: 9999px;
    background: var(--color-primary); color: #fff; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(79,70,229,0.5);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all var(--transition-base);
}
.pol-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.pol-top:hover { background: var(--color-primary-dark); }

/* ---- Subdomain availability checker ---- */
.sd-check-wrap {
    display: flex; align-items: stretch;
    border: 1px solid #e2e8f0; border-radius: 0.85rem; overflow: hidden;
    background: #fff; transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.sd-check-wrap:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }
.dark .sd-check-wrap { background: #0f172a; border-color: #334155; }
.sd-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 0.75rem 0.9rem; font-size: 0.95rem; color: #0f172a; }
.dark .sd-input { color: #e2e8f0; }
.sd-suffix { display: flex; align-items: center; padding: 0 0.9rem; font-size: 0.9rem; color: #94a3b8; background: #f8fafc; border-left: 1px solid #e2e8f0; white-space: nowrap; }
.dark .sd-suffix { background: #1e293b; border-left-color: #334155; }
.sd-result { margin-top: 0.9rem; font-size: 0.9rem; font-weight: 500; min-height: 1.25rem; display: none; align-items: center; gap: 0.5rem; }
.sd-result.show { display: flex; }
.sd-result.ok  { color: #16a34a; }
.sd-result.no  { color: #dc2626; }
.sd-result.load { color: #64748b; }
.dark .sd-result.ok { color: #4ade80; } .dark .sd-result.no { color: #f87171; }
.sd-spin { width: 1rem; height: 1rem; border-radius: 9999px; border: 2px solid #cbd5e1; border-top-color: var(--color-primary); animation: ctSpin 0.7s linear infinite; }
@keyframes ctSpin { to { transform: rotate(360deg); } }
