/* =========================================================================
   SKOLFOTO ARKIVSÖKARE — Frontend CSS
   Tema: Ample Pro (svensktskolfoto.se)
   Färger: blå #006AA7, gul #FFD600
   ========================================================================= */

.sfas-wrapper {
    max-width: 100%;
    margin: 30px 0;
    padding: 28px 28px 24px;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
}

.sfas-intro {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #FFD600;
}

.sfas-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #006AA7;
    margin: 0 0 8px;
    line-height: 1.3;
}

.sfas-lead {
    font-size: 15px;
    color: #444;
    margin: 0;
    line-height: 1.5;
}

/* === FORMULÄR === */
.sfas-form {
    display: block;
    margin-bottom: 16px;
}

.sfas-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.sfas-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sfas-field label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin-bottom: 6px !important;
    display: block;
    line-height: 1.4;
}

.sfas-optional {
    font-weight: 400;
    color: #888;
    font-size: 12px;
}

.sfas-field input[type="text"],
.sfas-field select {
    padding: 10px 12px !important;
    border: 1px solid #d0d0d6 !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    background: #fff !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 44px !important;
    margin: 0 !important;
}

.sfas-field input[type="text"]:focus,
.sfas-field select:focus {
    outline: none !important;
    border-color: #006AA7 !important;
    box-shadow: 0 0 0 3px rgba(0, 106, 167, 0.15) !important;
}

.sfas-submit {
    display: block;
    width: 100%;
    padding: 12px 24px !important;
    background: #006AA7 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.4 !important;
    min-height: 44px;
    margin: 0 !important;
}

.sfas-submit:hover {
    background: #004d7a;
}

.sfas-submit:disabled {
    background: #999;
    cursor: not-allowed;
}

.sfas-submit-loading {
    display: none;
}

.sfas-submit.is-loading .sfas-submit-text {
    display: none;
}

.sfas-submit.is-loading .sfas-submit-loading {
    display: inline;
}

/* === RESULTAT === */
.sfas-results {
    margin-top: 24px;
}

.sfas-results:empty {
    display: none;
}

.sfas-result-card {
    background: #f8fafc;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    padding: 24px;
}

.sfas-result-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #006AA7;
}

.sfas-result-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.sfas-result-sub {
    margin: 0;
    color: #555;
    font-size: 14px;
}

/* === ACCORDION === */
.sfas-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sfas-section {
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    overflow: hidden;
}

.sfas-section[open] {
    border-color: #006AA7;
    box-shadow: 0 1px 6px rgba(0, 106, 167, 0.1);
}

.sfas-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 16px;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}

.sfas-section-head::-webkit-details-marker {
    display: none;
}

.sfas-section-head:hover {
    background: #f8fafc;
}

.sfas-section-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.sfas-section-title {
    flex-grow: 1;
}

.sfas-section-arrow {
    font-size: 14px;
    color: #006AA7;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.sfas-section[open] .sfas-section-arrow {
    transform: rotate(180deg);
}

.sfas-section-body {
    padding: 4px 18px 18px;
    border-top: 1px solid #f0f0f4;
    line-height: 1.6;
}

.sfas-section-body p {
    margin: 12px 0;
}

.sfas-section-body p:first-child {
    margin-top: 12px;
}

.sfas-section-body a {
    color: #006AA7;
    text-decoration: underline;
}

.sfas-section-body a:hover {
    color: #004d7a;
}

/* === KOMMUNARKIV === */
.sfas-arkiv-namn {
    font-size: 17px;
    color: #006AA7;
    margin: 14px 0 10px;
}

.sfas-kontakt {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.sfas-kontakt li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f4;
    font-size: 15px;
}

.sfas-kontakt li:last-child {
    border-bottom: none;
}

.sfas-notering {
    margin: 12px 0;
    padding: 12px 14px;
    background: #fff9d6;
    border-left: 3px solid #FFD600;
    border-radius: 4px;
    font-size: 14px;
    color: #1a1a1a;
}

.sfas-instruktion {
    padding: 12px 14px;
    background: #eef5fa;
    border-left: 3px solid #006AA7;
    border-radius: 4px;
    font-size: 14px;
}

/* === SÖKKNAPPAR (Google-sökningar) === */
.sfas-grupp-besk {
    color: #555;
    font-size: 14px;
    font-style: italic;
    margin: 8px 0 14px;
}

.sfas-sokningar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sfas-sok-knapp {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #fff !important;
    border: 1px solid #e5e5ea !important;
    border-left: 3px solid #006AA7 !important;
    border-radius: 6px;
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-size: 15px;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.sfas-sok-knapp:hover {
    background: #f1f7fc !important;
    border-color: #006AA7 !important;
    color: #004d7a !important;
    text-decoration: none !important;
}

.sfas-sok-knapp:active {
    transform: translateY(1px);
}

.sfas-sok-label {
    flex-grow: 1;
}

.sfas-sok-icon {
    color: #006AA7;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

/* === FOTOFÖRETAG === */
.sfas-intro-text {
    color: #555;
    font-size: 14px;
    font-style: italic;
}

.sfas-foretag-lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.sfas-foretag {
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #006AA7;
}

.sfas-foretag-namn {
    font-size: 16px;
    font-weight: 700;
    color: #006AA7;
    margin: 0 0 8px;
}

.sfas-foretag-besk,
.sfas-foretag-arkiv {
    font-size: 14px;
    margin: 8px 0;
    line-height: 1.5;
}

.sfas-foretag-lank {
    margin: 10px 0 0;
}

/* === DIGITALA ARKIV === */
.sfas-arkiv-lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.sfas-digitalt-arkiv {
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #FFD600;
}

.sfas-arkiv-titel {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
}

.sfas-arkiv-titel a {
    color: #006AA7;
    text-decoration: underline;
}

.sfas-arkiv-besk,
.sfas-arkiv-tips {
    font-size: 14px;
    margin: 8px 0;
    line-height: 1.5;
}

/* === SÖKTIPS === */
.sfas-tips-lista {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.sfas-tips-lista li {
    position: relative;
    padding: 8px 0 8px 28px;
    font-size: 15px;
    line-height: 1.55;
    border-bottom: 1px solid #f0f0f4;
}

.sfas-tips-lista li:last-child {
    border-bottom: none;
}

.sfas-tips-lista li:before {
    content: "✓";
    position: absolute;
    left: 4px;
    top: 8px;
    color: #006AA7;
    font-weight: 700;
}

/* === DISCLAIMER === */
.sfas-disclaimer {
    margin: 18px 0 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* === FEL === */
.sfas-error {
    padding: 14px 16px;
    background: #fff0f0;
    border-left: 3px solid #d32f2f;
    border-radius: 4px;
    color: #b71c1c;
    font-size: 14px;
}

/* === MOBIL === */
@media (max-width: 700px) {
    .sfas-wrapper {
        padding: 20px 18px;
        margin: 20px 0;
    }

    .sfas-title {
        font-size: 1.25rem;
    }

    .sfas-lead {
        font-size: 14px;
    }

    .sfas-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }

    .sfas-submit {
        width: 100%;
        padding: 14px 20px !important;
    }

    .sfas-result-card {
        padding: 18px 16px;
    }

    .sfas-result-title {
        font-size: 1.1rem;
    }

    .sfas-section-head {
        padding: 13px 14px;
        font-size: 15px;
    }

    .sfas-section-body {
        padding: 4px 14px 16px;
    }

    .sfas-foretag,
    .sfas-digitalt-arkiv {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .sfas-wrapper {
        padding: 16px 14px;
    }

    .sfas-section-head {
        font-size: 14px;
    }

    .sfas-section-icon {
        font-size: 16px;
    }
}
