/*
Theme Name:   ATDT GP Siteaudit
Theme URI:    https://www.siteaudit.se/
Description:  GeneratePress child theme for siteaudit.se. AI-verktyg och analysrapporter.
Version:      1.0.0
Author:       ATDT AB
Author URI:   https://www.siteaudit.se/
Template:     generatepress
License:      GPL-2.0-or-later
Text Domain:  atdt-gp-siteaudit
*/

/* =========================================================
   AI-readiness tool: verktygets formular och resultat
   ========================================================= */

.sa-tool-wrap {
    max-width: 740px;
    margin: 0 auto;
}

.sa-intro {
    margin-bottom: 1.5rem;
}

.sa-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.sa-form__input {
    flex: 1 1 280px;
    padding: 0.6rem 0.9rem;
    border: 2px solid #d0d5dd;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.5;
    min-width: 0;
}

.sa-form__input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.sa-form__btn {
    padding: 0.6rem 1.4rem;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.sa-form__btn:hover {
    background: #1a5a8f;
}

.sa-form__btn:disabled {
    background: #8ba5c0;
    cursor: not-allowed;
}

/* ---- Resultatcontainer ---- */

.sa-result {
    margin-top: 1.5rem;
}

.sa-result--hidden {
    display: none;
}

.sa-status-msg {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    border-left: 4px solid #d0d5dd;
    background: #f8f9fa;
}

.sa-status-msg--error {
    border-color: #d63638;
    background: #fff5f5;
    color: #d63638;
}

/* ---- Poäng (score) ---- */

.sa-score-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    background: #f0f6fc;
    border: 1px solid #c8dff0;
}

.sa-score-number {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    color: #2271b1;
    min-width: 3rem;
    text-align: right;
}

.sa-score-label {
    font-size: 0.95rem;
    color: #555;
}

/* ---- Grupprad ---- */

.sa-groups {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sa-group {
    padding: 0.9rem 0;
    border-bottom: 1px solid #e9ecef;
}

.sa-group:last-child {
    border-bottom: none;
}

.sa-group__header {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.sa-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 1px;
}

.sa-badge--pass {
    background: #d4edda;
    color: #155724;
}

.sa-badge--warn {
    background: #fff3cd;
    color: #7d5800;
}

.sa-badge--fail {
    background: #f8d7da;
    color: #721c24;
}

.sa-group__label {
    font-weight: 600;
    font-size: 0.95rem;
}

.sa-group__detail {
    margin: 0.4rem 0 0 0;
    font-size: 0.9rem;
    color: #444;
}

.sa-group__fix {
    margin: 0.3rem 0 0 0;
    font-size: 0.88rem;
    color: #555;
    font-style: italic;
}

/* ---- Dela-block ---- */

.sa-share {
    margin-top: 1.5rem;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    background: #f0f6fc;
    border: 1px solid #c8dff0;
    font-size: 0.9rem;
}

.sa-share a {
    word-break: break-all;
}

/* =========================================================
   Enskild rapport (single-report.php)
   ========================================================= */

.sa-report-meta {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.sa-report-url {
    word-break: break-all;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 480px) {
    .sa-form {
        flex-direction: column;
    }
    .sa-form__input,
    .sa-form__btn {
        width: 100%;
    }
    .sa-score-number {
        font-size: 1.8rem;
    }
}
