/* ============================================================
   7×7 Collaborations — Frontend CSS
   Matches sevenbyseven theme exactly:
   — Circular (Helvetica Neue fallback) for all UI
   — Adobe Caslon Pro (Georgia fallback) for literary text only
   — container: calc(100% - 100px), 50px margins
   — type scale: 72px names, 45px collab names, 25px/30px body
   ============================================================ */

/* ── Base ── */
.sxsx-portal-page {
    width: 100%;
}

.sxsx-wrap {
    width: calc(100% - 100px);
    margin: 0 auto;
    padding-top: 10px;
    padding-bottom: 100px;
}

/* ── Portal header ── */
.sxsx-portal-head {
    width: calc(100% - 100px);
    margin: 0 auto;
    padding-top: 50px;
    padding-bottom: 20px;
}

/* Collaborator names — 45px/700 */
.sxsx-portal-names {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 45px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: inherit;
    margin-bottom: 30px;
}

/* ── Dot tracker ── */
.sxsx-dot-tracker {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 25px;
}

.sxsx-dot-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sxsx-dot-row-circles {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sxsx-turn-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid currentColor;
    flex-shrink: 0;
}

.sxsx-turn-dot.done {
    background: currentColor;
}

.sxsx-turn-dot.pending {
    background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.sxsx-dot-row-name {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: inherit;
    opacity: 1;
}

/* ── State line — eyebrow treatment ── */
.sxsx-portal-state {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 1;
    color: inherit;
    margin: 0;
}

/* ── Section eyebrow ── */
.sxsx-eyebrow {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 1;
    color: inherit;
    margin-bottom: 14px;
    margin-top: 24px;
    display: block;
}

/* ── Partner turn ── */
.sxsx-partner-turn {
    margin-bottom: 24px;
}

/* ── Body text — 25px/30px Circular ── */
.sxsx-body-text {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    line-height: 30px;
    font-weight: 400;
    color: inherit;
    max-width: 640px;
}

/* ── Literary text — Adobe Caslon Pro ── */
.sxsx-turn-text {
    font-family: 'Adobe Caslon Pro', 'Minion Pro', Georgia, 'Times New Roman', Times, serif;
    font-size: 25px;
    line-height: 30px;
    color: inherit;
    max-width: 640px;
}

/* ── Image turns ── */
.sxsx-image-turn img {
    max-width: 480px;
    width: 100%;
    display: block;
}

/* ── Portal hint text — below form fields ── */
.sxsx-portal-hint {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    line-height: 1.5;
    font-weight: 400;
    color: inherit;
    opacity: 1;
    margin-top: 16px;
    max-width: 640px;
}

/* ── Portal textareas — full bounding box, 2px ── */
.sxsx-portal-textarea {
    width: 100%;
    max-width: 640px;
    border: 2px solid currentColor;
    padding: 14px 16px;
    background: transparent;
    color: inherit;
    outline: none;
    border-radius: 0;
    resize: vertical;
    display: block;
    -webkit-appearance: none;
}

.sxsx-portal-textarea:focus { outline: none; }
.sxsx-portal-textarea::placeholder { opacity: 1; color: inherit; }

/* Writer input — Caslon */
.sxsx-writer-input {
    font-family: 'Adobe Caslon Pro', 'Minion Pro', Georgia, 'Times New Roman', Times, serif;
    font-size: 25px;
    line-height: 1.5;
    min-height: 220px;
}

/* Concerns input — Circular */
#sxsx-concern-text {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    line-height: 1.5;
    min-height: 140px;
}

/* ── File drop zone — 2px border ── */
.sxsx-file-drop {
    border: 2px solid currentColor;
    padding: 50px 30px;
    max-width: 480px;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.15s;
}

.sxsx-file-drop:hover { opacity: 1; }

.sxsx-file-drop-icon {
    display: none;
}

.sxsx-file-drop-label {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    color: inherit;
    margin-bottom: 8px;
}

.sxsx-file-drop-sub {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    color: inherit;
    opacity: 1;
}

/* ── Buttons ── */
.sxsx-btn {
    display: inline-block;
    padding: 10px 32px;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
    border: none;
    -webkit-appearance: none;
    background: var(--fg, #000);
    color: var(--bg, #fff);
}

.sxsx-btn:hover { opacity: 1; }

.sxsx-btn-outline {
    display: inline-block;
    padding: 8px 24px;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
    border: 2px solid currentColor;
    background: transparent;
    color: inherit;
    -webkit-appearance: none;
}

/* ── Accordions — About page scale ── */
.sxsx-acc-trigger {
    display: block;
    cursor: pointer;
    user-select: none;
    margin-top: 40px;
    position: relative;
    padding-left: 50px;
}

/* CSS-drawn + : two gradient bars (cross).
   When open (.sxsx-acc-open), vertical bar removed → minus. */
.sxsx-acc-trigger::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background:
        linear-gradient(currentColor, currentColor) center / 28px 4px no-repeat,
        linear-gradient(currentColor, currentColor) center / 4px 28px no-repeat;
}

.sxsx-acc-trigger.sxsx-acc-open::before {
    background:
        linear-gradient(currentColor, currentColor) center / 28px 4px no-repeat;
}

/* Safety: hide any legacy icon span left in markup */
.sxsx-acc-icon { display: none; }

.sxsx-acc-heading {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.0;
    color: inherit;
}

.sxsx-acc-body {
    padding-left: 50px;
    overflow: hidden;
    max-height: 4000px;
    transition: max-height 0.45s ease, opacity 0.3s ease;
    opacity: 1;
    padding-top: 30px;
}

.sxsx-fa-collapsed {
    max-height: 0 !important;
    opacity: 0;
    pointer-events: none;
    padding-top: 0;
}

/* ── Timeline ── */
.sxsx-timeline-turn {
    margin-bottom: 60px;
}

.sxsx-timeline-meta {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    font-weight: 400;
    opacity: 1;
    margin-bottom: 14px;
    display: flex;
    gap: 20px;
    color: inherit;
}

.sxsx-timeline-num {
    font-weight: 700;
    opacity: 1;
}

/* ── Success / error ── */
.sxsx-success,
.sxsx-error {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    line-height: 30px;
    font-weight: 400;
    color: inherit;
    max-width: 640px;
}

/* ── Simple form styles (intake + exit survey) ── */
.sxsx-simple-form .sxsx-field {
    margin-bottom: 50px;
}

.sxsx-simple-form .sxsx-label,
.sxsx-label {
    display: block;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
    margin-bottom: 10px;
}

.sxsx-simple-form .sxsx-req,
.sxsx-req {
    font-size: 25px;
    font-weight: 700;
    color: inherit;
    margin-left: 2px;
    vertical-align: baseline;
}

.sxsx-simple-form .sxsx-hint,
.sxsx-hint {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.5;
    color: inherit;
    opacity: 1;
    margin-bottom: 12px;
}

/* Short inputs + selects — bottom border only */
.sxsx-simple-form .sxsx-input,
.sxsx-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid currentColor;
    padding: 8px 0;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 400;
    background: transparent;
    color: inherit;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.sxsx-input:focus { outline: none; }
.sxsx-input::placeholder { opacity: 1; color: inherit; }

/* Textareas — full bounding box */
.sxsx-textarea-box {
    width: 100%;
    border: 2px solid currentColor;
    padding: 14px 16px;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.5;
    background: transparent;
    color: inherit;
    outline: none;
    border-radius: 0;
    resize: vertical;
    min-height: 130px;
    display: block;
}

.sxsx-textarea-box:focus { outline: none; }
.sxsx-textarea-box::placeholder { opacity: 1; color: inherit; }

/* Discipline picker — 28px filled circles */
.sxsx-discipline-opts {
    display: flex;
    gap: 50px;
    padding-top: 14px;
}

.sxsx-discipline-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 400;
    color: inherit;
    cursor: pointer;
    user-select: none;
}

.sxsx-discipline-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.sxsx-disc-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
    flex-shrink: 0;
    background: transparent;
    transition: background 0.12s;
    display: block;
}

.sxsx-discipline-opt input[type="radio"]:checked ~ .sxsx-disc-circle {
    background: currentColor;
}

/* Social rows */
.sxsx-social-row {
    display: flex;
    gap: 25px;
    align-items: baseline;
    margin-bottom: 12px;
}

/* Confidential tag */
.sxsx-confidential {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 1;
    vertical-align: middle;
    margin-left: 12px;
    color: inherit;
}

/* Date input — calendar icon on the left */
.sxsx-date-wrap {
    direction: rtl;
    max-width: 100%;
}
.sxsx-date-input {
    direction: ltr;
}

/* ── Suppress WP page title on plugin pages ── */
body.sxsx-page .entry-title,
body.sxsx-page .page-title,
body.sxsx-page h1.entry-title {
    display: none;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .sxsx-portal-names { font-size: 32px; }
    .sxsx-acc-trigger  { margin-left: 0; }
    .sxsx-acc-icon     { font-size: 28px; width: 32px; }
    .sxsx-acc-heading  { font-size: 28px; }
    .sxsx-acc-body     { padding-left: 32px; }
}

@media (max-width: 767px) {
    .sxsx-wrap,
    .sxsx-portal-head {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    .sxsx-portal-names { font-size: 24px; }
    .sxsx-acc-heading  { font-size: 22px; }
    .sxsx-acc-body     { padding-left: 0; }
    .sxsx-dot-tracker  { gap: 20px; }
    .sxsx-discipline-opts { flex-direction: column; gap: 20px; }
    .sxsx-btn,
    .sxsx-btn-outline  { display: block; text-align: center; width: 100%; max-width: 100%; }
}

/* ── Guideline accordions (beneath submission fields) ──
   Smaller than the main About-page accordions — eyebrow scale trigger,
   body text at 21px. ── */

.sxsx-guideline-acc {
    max-width: 640px;
}

.sxsx-guideline-trigger {
    display: block;
    position: relative;
    padding-left: 26px;
    cursor: pointer;
    user-select: none;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 1;
    color: inherit;
    padding-top: 8px;
    padding-bottom: 8px;
}

.sxsx-guideline-trigger:hover { opacity: 1; }

/* CSS-drawn + / - at smaller size */
.sxsx-guideline-trigger::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background:
        linear-gradient(currentColor, currentColor) center / 14px 3px no-repeat,
        linear-gradient(currentColor, currentColor) center / 3px 14px no-repeat;
}

.sxsx-guideline-trigger.sxsx-acc-open::before {
    background:
        linear-gradient(currentColor, currentColor) center / 14px 3px no-repeat;
}

/* Safety: hide any legacy icon span */
.sxsx-guideline-icon { display: none; }

.sxsx-guideline-body {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
    padding-top: 14px;
    padding-bottom: 10px;
}

.sxsx-guideline-body.sxsx-fa-collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    padding-top: 0;
    padding-bottom: 0;
}

.sxsx-guideline-body p {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    line-height: 1.5;
    font-weight: 400;
    color: inherit;
    opacity: 1;
}

/* ── Writer textarea — pre-wrap to preserve formatting ── */
.sxsx-writer-input {
    white-space: pre-wrap;
    font-family: 'Adobe Caslon Pro', 'Minion Pro', Georgia, 'Times New Roman', Times, serif;
    font-size: 25px;
    line-height: 1.6;
    min-height: 280px;
    tab-size: 4;
}

/* ── Agreement screen ── */
.sxsx-agreement-text {
    font-family: 'Adobe Caslon Pro', Georgia, serif;
    font-size: 18px;
    line-height: 1.7;
    color: inherit;
    max-width: 680px;
    border: 2px solid currentColor;
    padding: 40px 48px;
    margin-bottom: 50px;
    white-space: pre-wrap;
    opacity: 1;
}

.sxsx-agreement-form {
    max-width: 680px;
    margin-bottom: 70px;
}

.sxsx-agreement-sign-block {
    padding-top: 0;
}

/* Circle — reprise of discipline picker */
.sxsx-agreement-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    cursor: pointer;
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    line-height: 1.4;
    color: inherit;
    margin-bottom: 40px;
    user-select: none;
}

.sxsx-agreement-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.sxsx-agree-circle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: transparent;
    margin-top: 4px;
    transition: background 0.12s;
    display: block;
}

.sxsx-agreement-checkbox-label.is-checked .sxsx-agree-circle {
    background: currentColor;
}

.sxsx-agreement-sig-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    max-width: 480px;
    margin-bottom: 35px;
}

.sxsx-agreement-sig-name {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 32px;
    font-style: normal;
    color: inherit;
}

.sxsx-agreement-sig-date {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    opacity: 1;
    color: inherit;
}

.sxsx-agreement-question {
    max-width: 640px;
    padding-top: 60px;
    margin-bottom: 80px;
}

/* ── Editing page — diff view ── */
.sxsx-diff-view {
    margin-bottom: 12px;
}

.sxsx-diff-text {
    font-family: 'Adobe Caslon Pro', Georgia, serif;
    font-size: 25px;
    line-height: 1.6;
    color: inherit;
    white-space: pre-wrap;
}

.sxsx-diff-text del {
    text-decoration: line-through;
    opacity: 0.45;
}

.sxsx-diff-text ins {
    text-decoration: none;
    border-bottom: 2px solid currentColor;
    font-style: normal;
}

/* ── Editing badges ── */
.sxsx-edit-badge {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid currentColor;
}

.sxsx-edit-badge-approved {
    opacity: 1;
}

.sxsx-edit-badge-pending {
    opacity: 0.6;
}

.sxsx-edit-badge-unedited {
    opacity: 0.35;
}

/* ── Editing textarea ── */
.sxsx-edit-textarea {
    font-family: 'Adobe Caslon Pro', Georgia, serif;
    font-size: 25px;
    line-height: 1.6;
    border: 2px solid currentColor;
}

.sxsx-edit-note {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    line-height: 1.5;
    opacity: 1;
    border: none;
    border-bottom: 2px solid currentColor;
}

/* ── Editing turn separator ── */
/* Turn-level accordion trigger in editing portal */
.sxsx-edit-turn-trigger {
    position: relative;
    padding-left: 26px;
    cursor: pointer;
}

.sxsx-edit-turn-trigger::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background:
        linear-gradient(currentColor, currentColor) center / 14px 3px no-repeat,
        linear-gradient(currentColor, currentColor) center / 3px 14px no-repeat;
}

.sxsx-edit-turn-trigger.sxsx-acc-open::before {
    background:
        linear-gradient(currentColor, currentColor) center / 14px 3px no-repeat;
}

.sxsx-edit-turn {
    border-bottom-color: currentColor !important;
    border-bottom-style: solid;
}
.sxsx-edit-turn:last-child {
    border-bottom: none !important;
}

/* ── Terms & Privacy Page ──────────────────────────────── */
.sxsx-terms-updated {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 1;
    margin-top: 80px;
    margin-bottom: 0;
}
.sxsx-terms-heading {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    margin-top: 0;
}
.sxsx-terms-subhead {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 12px;
    max-width: 640px;
}
.sxsx-terms-body {
    font-family: Circular, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 25px;
    line-height: 1.4;
    margin-bottom: 14px;
    max-width: 640px;
}
.sxsx-terms-body strong {
    font-weight: 700;
}
.sxsx-terms-body a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sxsx-terms-divider {
    height: 4px;
    opacity: 1;
    background: currentColor;
    margin: 70px 0;
    max-width: 640px;
}

/* ── Word counter ── */
.sxsx-word-count {
    font-size: 0.75rem;
    opacity: 1;
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}
.sxsx-word-count.sxsx-wc-over {
    opacity: 1;
    color: #cc6600;
}

/* ── Image preview + meta ── */
.sxsx-image-preview {
    margin-top: 20px;
}
.sxsx-image-meta {
    font-size: 0.75rem;
    margin-top: 10px;
    opacity: 1;
    line-height: 1.5;
}
.sxsx-image-meta.sxsx-meta-warn {
    opacity: 1;
    color: #cc6600;
}
.sxsx-image-meta.sxsx-meta-ok {
    opacity: 1;
}
.sxsx-image-meta.sxsx-meta-good {
    opacity: 1;
}

/* ── Lightbox ── */
.sxsx-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sxsx-lightbox-inner {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
}
.sxsx-lightbox-inner img {
    max-width: 92vw;
    max-height: 92vh;
    display: block;
    object-fit: contain;
}
.sxsx-lightbox-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
