/* Careers screening questions.
   A white card on the orange "Please Fill Out The Form Below" section, split
   into numbered sections. Yes/No questions are list rows with a compact
   Yes | No switch on the right; every text box, dropdown and choice shares one
   height and corner radius so the form reads as one calm, even system.
   The theme styles every input as a 30px-margin grey pill, so the rules here
   are scoped to .cosmo-sq and deliberately reset those. */

.cosmo-sq [hidden],
.cosmo-sq[hidden] { display: none !important; }

.cosmo-sq {
    --sq-ink: #1f2d3d;
    --sq-muted: #5f6b78;
    --sq-line: #dde3ea;
    --sq-field: #c9d2dc;
    --sq-soft: #f5f7fa;
    --sq-brand: #2bb673;        /* the site's green (Choose File, Thank you) */
    --sq-brand-soft: #e8f7ef;
    --sq-req: #d93a1c;
    --sq-h: 50px;               /* one height for every control */
    --sq-r: 12px;               /* one corner radius for every control */

    background: #fff;
    border-radius: 22px;
    padding: 26px 28px 10px;
    margin: 8px 0 24px;
    box-shadow: 0 14px 40px rgba(60, 20, 0, .18);
    color: var(--sq-ink);
}

/* ---------------------------------------------------------------- header */
.cosmo-sq-head { margin-bottom: 6px; }
.cosmo-sq-title { color: var(--sq-ink); font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.cosmo-sq-sub { color: var(--sq-muted); font-size: 14px; margin: 0; }
.cosmo-sq-req { color: var(--sq-req); font-weight: 700; }
.cosmo-sq-opt { color: var(--sq-muted); font-weight: 500; font-size: 13px; }

/* -------------------------------------------------------------- sections */
.cosmo-sq-sec { border-top: 1px solid var(--sq-line); padding: 22px 0 6px; margin-top: 18px; }
.cosmo-sq-sec-title {
    display: flex; align-items: center; gap: 10px;
    color: var(--sq-ink); font-size: 17px; font-weight: 700; margin: 0 0 16px;
}
.cosmo-sq-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--sq-brand-soft); color: #167a48;
    font-size: 14px; font-weight: 700; flex: none;
}
.cosmo-sq-sec-note { color: var(--sq-muted); font-size: 14px; margin: -8px 0 16px 38px; }
.cosmo-sq-sec-note.is-required { color: #9a3412; font-weight: 600; }

.cosmo-sq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    align-items: stretch;
}
.cosmo-sq-item.is-full,
.cosmo-sq-item.is-row { grid-column: 1 / -1; }

/* The theme floats labels and gives items their own spacing: undo both. */
.cosmo-sq .cosmo-sq-item { margin: 0; padding: 0; position: relative; }
.cosmo-sq .form-builder-item label.cosmo-sq-label {
    float: none; display: block; margin: 0 0 8px;
    color: var(--sq-ink); font-size: 15px; font-weight: 600; line-height: 1.45;
}
.cosmo-sq .form-builder-item label.cosmo-sq-pill,
.cosmo-sq .form-builder-item label.cosmo-sq-check { float: none; display: inline-block; margin: 0; }

/* Side by side: the question takes whatever height the longer of the two
   needs and sits at its bottom, so both boxes line up. */
.cosmo-sq-item.is-half { display: flex; flex-direction: column; }
.cosmo-sq .cosmo-sq-item.is-half > label.cosmo-sq-label { flex: 1 0 auto; display: flex; align-items: flex-end; }

/* ------------------------------------------------- text, number, date, select */
.cosmo-sq .cosmo-sq-item input[type=text],
.cosmo-sq .cosmo-sq-item input[type=number],
.cosmo-sq .cosmo-sq-item input[type=date],
.cosmo-sq .cosmo-sq-item select {
    width: 100%;
    height: var(--sq-h);
    margin: 0;
    padding: 0 16px;
    border: 1.5px solid var(--sq-field);
    border-radius: var(--sq-r);
    background-color: #fff;
    color: var(--sq-ink);
    font-size: 15px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.cosmo-sq .cosmo-sq-item input::placeholder { color: #8a95a1; }
.cosmo-sq .cosmo-sq-item select {
    -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6b78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.cosmo-sq .cosmo-sq-item input[type=text]:hover,
.cosmo-sq .cosmo-sq-item input[type=number]:hover,
.cosmo-sq .cosmo-sq-item input[type=date]:hover,
.cosmo-sq .cosmo-sq-item select:hover { border-color: #9fabb8; }
.cosmo-sq .cosmo-sq-item input[type=text]:focus,
.cosmo-sq .cosmo-sq-item input[type=number]:focus,
.cosmo-sq .cosmo-sq-item input[type=date]:focus,
.cosmo-sq .cosmo-sq-item select:focus {
    border-color: var(--sq-brand);
    box-shadow: 0 0 0 3px rgba(43, 182, 115, .18);
    background-color: #fff;
    color: var(--sq-ink);
}

/* ------------------------------------- Yes/No rows: question left, switch right */
.cosmo-sq-item.is-row {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    gap: 10px 24px;
    padding: 12px 0;
    border-top: 1px solid var(--sq-line);   /* lines between rows; none after the last, so no double line before the next section */
}
.cosmo-sq-grid > .cosmo-sq-item.is-row + .cosmo-sq-item.is-row { margin-top: -18px; }   /* rows sit flush as one list */
.cosmo-sq .cosmo-sq-item.is-row > label.cosmo-sq-label { margin: 0; flex: 1 1 320px; }
.cosmo-sq-item.is-row .form-error { flex-basis: 100%; }

.cosmo-sq-seg {
    display: inline-flex; flex: none;
    border: 1.5px solid var(--sq-field); border-radius: var(--sq-r);
    overflow: hidden; background: #fff;
}
.cosmo-sq-seg .cosmo-sq-pill + .cosmo-sq-pill span { border-left: 1.5px solid var(--sq-field); }
.cosmo-sq-seg .cosmo-sq-pill span {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 76px; height: 44px; padding: 0 16px;
    font-size: 15px; font-weight: 600; color: var(--sq-ink);
    transition: background .15s, color .15s;
}
.cosmo-sq-seg .cosmo-sq-pill:hover span { background: var(--sq-soft); }
.cosmo-sq-seg .cosmo-sq-pill input:checked + span { background: var(--sq-brand); color: #fff; }

/* ------------------------------------------- multi-word choices (pay, flexibility) */
.cosmo-sq-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.cosmo-sq-pills .cosmo-sq-pill span {
    display: inline-flex; align-items: center; gap: 7px;
    height: var(--sq-h); padding: 0 20px;
    border: 1.5px solid var(--sq-field); border-radius: var(--sq-r);
    background: #fff; color: var(--sq-ink);
    font-size: 15px; font-weight: 600;
    transition: background .15s, color .15s, border-color .15s;
}
.cosmo-sq-pills .cosmo-sq-pill:hover span { border-color: var(--sq-brand); }
.cosmo-sq-pills .cosmo-sq-pill input:checked + span {
    background: var(--sq-brand-soft); border-color: var(--sq-brand); color: #145c38;
}

/* shared by both choice styles */
.cosmo-sq-pill { position: relative; cursor: pointer; }
.cosmo-sq-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cosmo-sq-pill input:checked + span::before {
    content: ""; width: 5px; height: 10px; flex: none;
    border: solid currentColor; border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) translateY(-2px);
}
.cosmo-sq-pill input:focus-visible + span,
.cosmo-sq-check input:focus-visible + span { outline: 3px solid var(--sq-ink); outline-offset: 2px; }

.cosmo-sq-amount { margin-top: 10px; max-width: 360px; }

/* --------------------------------------------------------- skills checkboxes */
.cosmo-sq-item[data-sq="skills"] {
    background: var(--sq-soft); border-radius: 14px; padding: 16px !important;
}
.cosmo-sq-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.cosmo-sq-check { position: relative; cursor: pointer; }
.cosmo-sq-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cosmo-sq-check span {
    display: inline-flex; align-items: center;
    height: 40px; padding: 0 14px 0 38px;
    border: 1.5px solid var(--sq-field); border-radius: 10px;
    background: #fff; color: var(--sq-ink);
    font-size: 14px; font-weight: 600; position: relative;
}
.cosmo-sq-check:hover span { border-color: var(--sq-brand); }
.cosmo-sq-check span::before {
    content: ""; position: absolute; left: 12px; top: 50%;
    width: 17px; height: 17px; margin-top: -8.5px;
    border: 2px solid #9aa6b2; border-radius: 4px; background: #fff;
}
.cosmo-sq-check input:checked + span { background: var(--sq-brand-soft); border-color: var(--sq-brand); color: #145c38; }
.cosmo-sq-check input:checked + span::before { background: var(--sq-brand); border-color: var(--sq-brand); }
.cosmo-sq-check input:checked + span::after {
    content: ""; position: absolute; left: 18px; top: 50%;
    width: 5px; height: 9px; margin-top: -6.5px;
    border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* ------------------------------------------------------------ salary documents */
.cosmo-sq-file {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    min-height: var(--sq-h);
    border: 1.5px dashed var(--sq-field); border-radius: var(--sq-r);
    background: var(--sq-soft); padding: 10px 16px;
}
.cosmo-sq .cosmo-sq-file input[type=file] {
    background: none; border: 0; box-shadow: none;
    padding: 0; margin: 0; height: auto; min-height: 0; width: 100%;
    color: var(--sq-muted); font-size: 14px; border-radius: 0;
}

.cosmo-sq-hint { color: var(--sq-muted); font-size: 13px; }
.cosmo-sq .form-error { margin-top: 8px !important; }

/* ------------------------------------------------------------------- phones */
@media (max-width: 767px) {
    .cosmo-sq { padding: 20px 16px 6px; margin: 6px 0 20px; border-radius: 18px; }
    .cosmo-sq-grid { grid-template-columns: 1fr; gap: 16px; }
    .cosmo-sq .cosmo-sq-item.is-half > label.cosmo-sq-label { flex: none; }
    .cosmo-sq-item.is-row { padding: 12px 0 14px; }
    .cosmo-sq-grid > .cosmo-sq-item.is-row + .cosmo-sq-item.is-row { margin-top: -16px; }
    .cosmo-sq .cosmo-sq-item.is-row > label.cosmo-sq-label { flex-basis: 100%; }
    .cosmo-sq-sec-note { margin-left: 0; }
    .cosmo-sq-pills .cosmo-sq-pill span { padding: 0 16px; font-size: 14px; }
}
