/* Contact Us (help/contact.html), About Us (help/about.html), the shared tabs (help/tabs.html),
   the FAQ page's contact card and the admin Contact Messages inbox. Dark mode keys off
   html[data-theme="dark"]. Help page and admin card base styles live in account-menu.css. */

.sp-page { max-width: 1180px; margin: 0 auto; padding: 8px 0 40px; }

/* ---- tabs ---- */
.sp-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 22px; }
.sp-tab { padding: 8px 16px; border: 1px solid #cfd8e3; border-radius: 6px; background: #fff; color: #1f4e79;
          text-decoration: none; font-weight: 500; box-shadow: 0 1px 2px rgba(15, 30, 55, .06); }
.sp-tab:hover { background: #eef4fb; color: #163a5c; }
.sp-tab.is-active { border: 2px solid #1f4e79; padding: 7px 15px; font-weight: 600; }
.hc-page .sp-tabs { margin-top: 0; }

.sp-title { font-size: 2rem; font-weight: 700; color: #1d2b3a; margin: 0 0 12px; }
.sp-lead { font-size: 1.05rem; color: #34495e; max-width: 640px; }
.sp-hours { display: flex; align-items: center; gap: 8px; color: #34495e; font-weight: 500; }

/* ---- contact: details ---- */
.sp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 22px 0; }
.sp-card { border-top: 1px solid #d5dde8; padding-top: 12px; }
.sp-card h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; color: #1d2b3a; margin: 0 0 8px; }
.sp-card a { font-size: 1.05rem; text-decoration: none; overflow-wrap: anywhere; }
.sp-card address { color: #34495e; line-height: 1.6; }
.sp-faq-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; padding: 14px 16px;
               border-radius: 8px; background: #eef4fb; color: #34495e; }
.sp-faq-note i { color: #1f6fb2; font-size: 1.2rem; line-height: 1.3; }

/* ---- contact: form panel ---- */
.sp-panel { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 22px 22px 24px;
            box-shadow: 0 4px 16px rgba(15, 30, 55, .06); }
.sp-panel-title { font-size: 1.45rem; font-weight: 600; color: #1d2b3a; margin: 0 0 6px; }
.sp-panel-lead { color: #34495e; margin-bottom: 10px; }
.sp-required-note { font-size: .82rem; color: #c0392b; margin-bottom: 12px; }
.sp-req { color: #c0392b; }
.sp-form .sp-field { margin-bottom: 14px; }
.sp-form label.sp-label { display: block; min-width: 0; padding: 0; margin: 0 0 5px; font-weight: 500; color: #1d2b3a; }
.sp-form .form-control, .sp-form .form-select { padding: 10px 12px; }
.sp-count { text-align: right; font-size: .78rem; color: #6c7a8c; margin-top: 3px; }
.sp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sp-submit { width: 100%; padding: 14px; border: 0; border-radius: 6px; background: #1f4e79; color: #fff; font-size: 1.05rem; font-weight: 500; }
.sp-submit:hover { background: #163a5c; }
.sp-submit:focus-visible { outline: 3px solid rgba(52, 152, 219, .5); outline-offset: 2px; }
.sp-sent { text-align: center; padding: 18px 6px; }
.sp-sent > i { font-size: 2.6rem; color: #27ae60; }
.sp-sent h2 { font-size: 1.3rem; font-weight: 600; margin: 10px 0 8px; color: #1d2b3a; }
.sp-sent p { color: #34495e; }

/* ---- about ---- */
.ab-hero { padding: 6px 0 10px; }
.ab-lead { font-size: 1.15rem; line-height: 1.6; color: #34495e; max-width: 760px; }
.ab-section { margin-top: 34px; }
.ab-section h2, .ab-cta h2 { font-size: 1.35rem; font-weight: 700; color: #1d2b3a; margin-bottom: 14px; }
.ab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ab-card { display: block; padding: 18px; border: 1px solid #e3e8ef; border-radius: 12px; background: #fff;
           color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ab-card:hover { border-color: #9fb9d6; box-shadow: 0 6px 18px rgba(15, 30, 55, .08); color: inherit; }
.ab-card > i { font-size: 1.5rem; color: #1f6fb2; }
.ab-card h3 { font-size: 1.05rem; font-weight: 700; margin: 8px 0 6px; color: #1d2b3a; }
.ab-card p { margin: 0; color: #5b6b82; font-size: .93rem; line-height: 1.5; }
.ab-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.ab-split p { color: #34495e; }
.ab-list { list-style: none; padding: 0; margin: 0 0 18px; }
.ab-list li { display: flex; gap: 10px; margin-bottom: 8px; color: #34495e; }
.ab-list i { color: #27ae60; font-size: 1.1rem; }
.ab-principles { padding: 18px 20px; border-radius: 12px; background: #eef4fb; }
.ab-principles dt { font-weight: 700; color: #1d2b3a; margin-top: 10px; }
.ab-principles dd { margin: 2px 0 0; color: #34495e; }
.ab-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 36px;
          padding: 20px 22px; border-radius: 12px; border: 1px solid #e3e8ef; background: #fff; }
.ab-cta h2 { margin-bottom: 4px; }
.ab-cta-actions { display: flex; gap: 10px; }
@media (max-width: 900px) { .ab-split { grid-template-columns: 1fr; } }

/* ---- FAQ page: still need help ---- */
.hc-contact { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
              margin-top: 26px; padding: 16px 18px; border-radius: 10px; background: #eef4fb; }
.hc-contact strong { color: #1d2b3a; }

/* ---- admin inbox ---- */
.cm-views { display: flex; gap: 6px; }
.cm-view { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid #cfd8e3; border-radius: 999px;
           text-decoration: none; color: #34495e; font-size: .9rem; background: #fff; }
.cm-view.is-active { background: #1f4e79; border-color: #1f4e79; color: #fff; }
.cm-count { background: #c0392b; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 700; }
.cm-msg { border-top: 1px solid #edf1f6; }
.cm-msg:first-of-type { border-top: 0; }
.cm-msg summary { display: grid; grid-template-columns: 10px minmax(160px, 1.1fr) minmax(120px, .9fr) 2fr auto auto; gap: 12px;
                  align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.cm-msg summary::-webkit-details-marker { display: none; }
.cm-msg summary:hover { background: rgba(13, 110, 253, .04); }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.cm-msg.is-new .cm-dot { background: #1f6fb2; }
.cm-msg.is-new .cm-from strong { font-weight: 800; }
.cm-from { display: flex; flex-direction: column; min-width: 0; }
.cm-email, .cm-when { font-size: .82rem; color: #6c7a8c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-topic { font-size: .85rem; color: #1f4e79; font-weight: 600; }
.cm-snippet { color: #5b6b82; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cm-msg.is-closed summary { opacity: .65; }
.cm-body { padding: 0 16px 16px 38px; }
.cm-meta { font-size: .8rem; color: #6c7a8c; margin-bottom: 8px; }

.cm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cm-actions form { display: inline; }
.cm-pages { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 10px; }
@media (max-width: 900px) {
  .cm-msg summary { grid-template-columns: 10px 1fr auto; }
  .cm-topic, .cm-snippet, .cm-when { grid-column: 2 / -1; }
}

/* ---- dark ---- */
[data-theme="dark"] .sp-tab { background: #10203a; border-color: #1d3454; color: #8cc4ff; }
[data-theme="dark"] .sp-tab:hover { background: #172b47; }
[data-theme="dark"] .sp-tab.is-active { border-color: #4da3ff; color: #e6edf7; }
[data-theme="dark"] .sp-title, [data-theme="dark"] .sp-card h2, [data-theme="dark"] .sp-panel-title,
[data-theme="dark"] .sp-sent h2, [data-theme="dark"] .ab-section h2, [data-theme="dark"] .ab-cta h2,
[data-theme="dark"] .ab-card h3, [data-theme="dark"] .ab-principles dt, [data-theme="dark"] .hc-contact strong { color: #e6edf7; }
[data-theme="dark"] .sp-lead, [data-theme="dark"] .sp-hours, [data-theme="dark"] .sp-card address,
[data-theme="dark"] .sp-panel-lead, [data-theme="dark"] .sp-sent p, [data-theme="dark"] .ab-lead,
[data-theme="dark"] .ab-split p, [data-theme="dark"] .ab-list li, [data-theme="dark"] .ab-principles dd { color: #c9d6e8; }
[data-theme="dark"] .sp-card { border-color: #1d3454; }
[data-theme="dark"] .sp-faq-note, [data-theme="dark"] .ab-principles, [data-theme="dark"] .hc-contact { background: #10203a; color: #c9d6e8; }
[data-theme="dark"] .sp-panel, [data-theme="dark"] .ab-card, [data-theme="dark"] .ab-cta { background: #10203a; border-color: #1d3454; box-shadow: none; }
[data-theme="dark"] .ab-card:hover { border-color: #2f6fb0; }
[data-theme="dark"] .ab-card p, [data-theme="dark"] .sp-count { color: #93a7c4; }
[data-theme="dark"] .sp-form label.sp-label { color: #e6edf7 !important; }
[data-theme="dark"] .sp-required-note, [data-theme="dark"] .sp-req { color: #ff8a80; }
[data-theme="dark"] .sp-submit { background: #2f6fb0; }
[data-theme="dark"] .sp-submit:hover { background: #3d85cf; }
[data-theme="dark"] .cm-view { background: #10203a; border-color: #1d3454; color: #c9d6e8; }
[data-theme="dark"] .cm-view.is-active { background: #2f6fb0; border-color: #2f6fb0; color: #fff; }
[data-theme="dark"] .cm-msg { border-color: #172b47; }
[data-theme="dark"] .cm-topic { color: #8cc4ff; }
[data-theme="dark"] .cm-snippet, [data-theme="dark"] .cm-email, [data-theme="dark"] .cm-when, [data-theme="dark"] .cm-meta { color: #93a7c4; }
[data-theme="dark"] .cm-text { background: #0d1a2f; color: #e6edf7; }

/* ---- conversation thread (help/conversation.html and the admin inbox) ---- */
.cv-page { max-width: 860px; }
.cv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cv-head .sp-title { margin-bottom: 4px; }
.cv-sub { color: #5b6b82; }
.cv-state { padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.cv-state.is-waiting { background: #fff4d6; color: #8a6100; }
.cv-state.is-answered { background: #e3f6ea; color: #1e7b45; }
.cv-state.is-closed { background: #eef1f5; color: #5b6b82; }
.cv-thread { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 12px; }
.cv-msg { max-width: 86%; padding: 12px 14px; border-radius: 12px; border: 1px solid #e3e8ef; background: #fff; }
.cv-msg.is-sender { align-self: flex-start; border-top-left-radius: 4px; }
.cv-msg.is-staff { align-self: flex-end; background: #eaf3fc; border-color: #c9def3; border-top-right-radius: 4px; }
.cv-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: .82rem; color: #6c7a8c; margin-bottom: 4px; }
.cv-meta strong { color: #1d2b3a; font-size: .9rem; }
.cv-text { white-space: pre-line; color: #1d2b3a; line-height: 1.55; overflow-wrap: anywhere; }
.cv-reply textarea { margin-top: 4px; }
.cv-reply-actions, .cm-reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cv-compact { margin: 8px 0 14px; }
.cv-compact .cv-msg { max-width: 92%; }
.cm-reply { padding: 12px; border-radius: 10px; background: #f6f8fb; border: 1px solid #e3e8ef; }
.cm-reply-actions .form-check-label { font-size: .88rem; }

[data-theme="dark"] .cv-sub, [data-theme="dark"] .cv-meta { color: #93a7c4; }
[data-theme="dark"] .cv-msg { background: #10203a; border-color: #1d3454; }
[data-theme="dark"] .cv-msg.is-staff { background: #13315a; border-color: #23508a; }
[data-theme="dark"] .cv-meta strong, [data-theme="dark"] .cv-text { color: #e6edf7; }
[data-theme="dark"] .cv-state.is-waiting { background: #4a3a00; color: #ffd66b; }
[data-theme="dark"] .cv-state.is-answered { background: #12402a; color: #7ee2a8; }
[data-theme="dark"] .cv-state.is-closed { background: #172b47; color: #93a7c4; }
[data-theme="dark"] .cm-reply { background: #0d1a2f; border-color: #1d3454; }
.sp-captcha { margin: 4px 0 14px; min-height: 65px; }
