/* ========================================================================
   FRAMGÅNGSHISTORIER SUBMISSION-FORMULÄR
   [sp_framgang_submission_form] — medlemmar delar sin egen berättelse

   Sektioner:
   1. FOUC-skydd + wrapper
   2. Intro
   3. Fält-grupper (label, input, textarea, select, hint)
   4. Checkbox-grid (diagnoser)
   5. Notice (medicin-disclaimer)
   6. Samtyckes-sektion
   7. Submit-knapp (states)
   8. Error/success-meddelanden
   9. Login-prompt (icke-inloggade)
   10. Mobilanpassning
   ======================================================================== */


/* ========================================================================
   1. FOUC-SKYDD + WRAPPER
   ======================================================================== */

.sp-fs-wrap {
    opacity: 1 !important;
    transition: opacity 0.15s ease;
    max-width: 720px;
    margin: 0 auto;
    font-family: proxima_nova_regular, sans-serif;
}

.sp-fs-wrap,
.sp-fs-wrap p,
.sp-fs-wrap label,
.sp-fs-wrap span,
.sp-fs-wrap a {
    font-family: proxima_nova_regular, sans-serif;
}


/* ========================================================================
   2. INTRO
   ======================================================================== */

.sp-fs-intro {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ece7e0;
}

.sp-fs-intro-title {
    font-family: 'Montserrat', proxima_nova_regular, sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #3D5F42 !important;
    margin: 0 0 10px !important;
    line-height: 1.3 !important;
}

.sp-fs-intro-text {
    font-family: proxima_nova_regular, sans-serif !important;
    font-size: 15px !important;
    color: #4D524D !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}


/* ========================================================================
   3. FORMULÄR-WRAPPER + FÄLT-GRUPPER
   ======================================================================== */

.sp-fs-form {
    padding: 32px;
    background: #fff;
    border: 1px solid #e8e5e1;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    font-family: proxima_nova_regular, sans-serif;
}

.sp-fs-field {
    margin-bottom: 24px;
}

.sp-fs-label {
    display: block;
    font-family: proxima_nova_regular, sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #2c2c2c;
    margin-bottom: 6px;
    line-height: 1.4;
}

.sp-fs-required {
    color: #b14040;
    font-weight: 700;
}

.sp-fs-optional {
    color: #999;
    font-weight: 400;
    font-size: 13px;
    font-style: italic;
}

.sp-fs-hint {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
    font-style: italic;
}

.sp-fs-input,
.sp-fs-textarea,
.sp-fs-select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d0ccc6;
    border-radius: 8px;
    font-size: 16px;
    font-family: proxima_nova_regular, sans-serif;
    color: #2c2c2c;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.sp-fs-input:focus,
.sp-fs-textarea:focus,
.sp-fs-select:focus {
    outline: none;
    border-color: #3D5F42;
    box-shadow: 0 0 0 3px rgba(61, 95, 66, 0.12);
}

.sp-fs-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.sp-fs-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}


/* ========================================================================
   4. CHECKBOX-GRID (diagnoser)
   ======================================================================== */

.sp-fs-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.sp-fs-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8f5f2;
    border: 1.5px solid #e8e5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #3a3a3a;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.sp-fs-checkbox-item:hover {
    background: #f0eae0;
    border-color: #d4c5b8;
}

.sp-fs-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #3D5F42;
    cursor: pointer;
}

.sp-fs-checkbox-item input[type="checkbox"]:checked + span {
    color: #3D5F42;
    font-weight: 600;
}


/* ========================================================================
   5. NOTICE (medicin-disclaimer)
   ======================================================================== */

.sp-fs-notice {
    background: #faf6ee;
    border-left: 3px solid #d4a84a;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #6a5920;
    line-height: 1.5;
}

.sp-fs-notice strong {
    color: #8a6d00;
    font-weight: 700;
}


/* ========================================================================
   6. SAMTYCKES-SEKTION
   ======================================================================== */

.sp-fs-consent {
    background: #f5f3f0;
    border: 1px solid #e8e5e1;
    border-radius: 8px;
    padding: 20px 22px;
    margin: 32px 0 24px;
}

.sp-fs-consent-title {
    font-family: proxima_nova_regular, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #2c2c2c !important;
    margin: 0 0 14px !important;
}

.sp-fs-consent-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #3a3a3a;
    line-height: 1.5;
    cursor: pointer;
}

.sp-fs-consent-item:last-of-type {
    margin-bottom: 0;
}

.sp-fs-consent-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    flex-shrink: 0;
    accent-color: #3D5F42;
    cursor: pointer;
}

.sp-fs-consent-withdrawal {
    font-size: 12px;
    color: #666;
    margin: 14px 0 0 !important;
    font-style: italic;
    line-height: 1.5;
}

.sp-fs-consent-withdrawal a {
    color: #3D5F42;
    text-decoration: underline;
}


/* ========================================================================
   7. SUBMIT-KNAPP
   ======================================================================== */

.sp-fs-submit {
    display: block;
    width: 100%;
    padding: 16px 32px;
    background: #3D5F42;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', proxima_nova_regular, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.sp-fs-submit:hover {
    background: #2e4a32;
}

.sp-fs-submit:active {
    transform: translateY(1px);
}

.sp-fs-submit:disabled {
    opacity: 0.6;
    cursor: wait;
    background: #3D5F42;
}


/* ========================================================================
   8. ERROR/SUCCESS-MEDDELANDEN
   ======================================================================== */

.sp-fs-error {
    color: #b14040;
    background: #fdf4f4;
    border: 1px solid #f0cfcf;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.sp-fs-error-global {
    margin: 16px 0;
    font-size: 14px;
}

.sp-fs-success {
    background: #edf5ed;
    border: 1px solid #c5d4c7;
    color: #3D5F42;
    padding: 24px 28px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    font-weight: 600;
    margin-bottom: 24px;
}


/* ========================================================================
   9. LOGIN-PROMPT (icke-inloggade)
   ======================================================================== */

.sp-fs-login-prompt {
    padding: 48px 32px;
    background: #f8f5f2;
    border: 1px solid #d8cbbe;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.sp-fs-login-title {
    font-family: 'Montserrat', proxima_nova_regular, sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #3D5F42 !important;
    margin: 0 0 14px !important;
}

.sp-fs-login-text {
    font-family: proxima_nova_regular, sans-serif !important;
    font-size: 15px !important;
    color: #4D524D !important;
    line-height: 1.6 !important;
    margin: 0 0 24px !important;
}

.sp-fs-login-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #3D5F42;
    color: #fff !important;
    border-radius: 50px;
    font-family: 'Montserrat', proxima_nova_regular, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.sp-fs-login-btn:hover {
    background: #2e4a32;
}

.sp-fs-login-alt {
    font-family: proxima_nova_regular, sans-serif !important;
    font-size: 13px !important;
    color: #666 !important;
    margin: 24px 0 0 !important;
    font-style: italic;
    line-height: 1.5 !important;
}

.sp-fs-login-alt a {
    color: #3D5F42;
    text-decoration: underline;
}


/* ========================================================================
   10. MOBILANPASSNING (max-width: 600px)
   ======================================================================== */

@media (max-width: 600px) {
    .sp-fs-form {
        padding: 22px 18px;
        border-radius: 10px;
    }

    .sp-fs-intro-title {
        font-size: 21px !important;
    }

    .sp-fs-intro-text {
        font-size: 14px !important;
    }

    .sp-fs-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .sp-fs-consent {
        padding: 16px 18px;
    }

    .sp-fs-login-prompt {
        padding: 36px 22px;
    }

    .sp-fs-login-title {
        font-size: 21px !important;
    }
}
