/* =============================================
   Foss Elektro AS – site.css
   ============================================= */

/* --- Brand colour tokens --- */
:root {
    --foss-dark:   #2c2c2c;
    --foss-accent: #4a9a1f;   /* Elfag green */
    --foss-light:  #f5f5f5;
    --foss-text:   #111111;
}

/* --- Bootstrap overrides & utilities --- */
.bg-foss {
    background-color: var(--foss-dark) !important;
}

.text-accent {
    color: var(--foss-accent) !important;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5);
}

.btn-accent {
    background-color: var(--foss-accent);
    color: #ffffff;
    font-weight: 600;
    border: none;
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: #3a7a18;
    color: #ffffff;
}

/* --- Typography --- */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    color: var(--foss-text);
    background-color: #ffffff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- Navbar --- */
.navbar-logo {
    height: 48px;
    width: auto;
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 32px;
    }
}

.footer-logo {
    height: 28px;
    width: auto;
}

.elfag-badge {
    display: block;
    background-color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
}

.service-icon {
    width: 80px;
    height: 80px;
}

.border-accent {
    border-color: var(--foss-accent) !important;
}

.navbar .nav-link {
    font-weight: 500;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar .nav-link:hover {
    color: var(--foss-accent) !important;
}

/* --- Footer --- */
.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--foss-accent);
    text-decoration: none;
}

/* --- Focus ring --- */
.btn:focus,
.btn:active:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(74, 154, 31, 0.4);
}

/* --- Section spacing --- */
.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-light {
    background-color: var(--foss-light);
}

/* --- Tilbakemelding (QR-landingsside) --- */
.tb-container {
    max-width: 560px;
}

.tb-stjerner {
    display: flex;
    flex-direction: row-reverse;   /* knappene ligger 5→1 i HTML */
    justify-content: center;
    gap: 0.25rem;
}

.tb-stjerne {
    background: none;
    border: none;
    padding: 0 0.15rem;
    font-size: clamp(2.75rem, 13vw, 3.5rem);
    line-height: 1;
    color: #d0d0d0;
    cursor: pointer;
    transition: color 0.1s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.tb-stjerne:hover,
.tb-stjerne:hover ~ .tb-stjerne,
.tb-stjerne:focus-visible,
.tb-stjerne:focus-visible ~ .tb-stjerne {
    color: #f5b301;
}

.tb-stjerne:hover {
    transform: scale(1.1);
}

.tb-stjerne:focus-visible {
    outline: 2px solid var(--foss-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.tb-skala {
    max-width: 320px;
    margin: 0 auto;
}

/* Håndskrevet hilsen (Caveat, SIL OFL 1.1 – se wwwroot/fonts/caveat/OFL.txt) */
@font-face {
    font-family: "Caveat";
    src: url("../fonts/caveat/caveat-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.tb-hilsen {
    font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--foss-accent);
    transform: rotate(-2deg);
}

.tb-vist-stjerner {
    font-size: 2rem;
    color: #f5b301;
    letter-spacing: 0.1em;
}

/* --- Admin for tilbakemeldinger --- */
.tb-gull {
    color: #f5b301;
}

.tb-lav {
    border-left: 4px solid #dc3545 !important;
}

.tb-kommentar {
    white-space: pre-line;   /* behold kundens linjeskift */
}

.tb-qrkort {
    max-width: 380px;
}

.tb-qr svg {
    width: 100%;
    height: auto;
    display: block;
}

@media print {
    body {
        background: #fff !important;
    }

    .tb-qrkort {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* --- Adresseforslag i kontaktskjemaet --- */
.tb-adresseforslag {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 18rem;
    overflow-y: auto;
    margin-top: 2px;
}

.tb-adresseforslag [role="option"] {
    cursor: pointer;
}

.tb-adresseforslag [role="option"].active {
    background-color: var(--foss-light);
    color: var(--foss-text);
    border-color: rgba(0, 0, 0, 0.125);
}

.tb-adressekilde {
    background-color: #fff;
    font-size: 0.75rem;
}
