/* profilegen - Layout im CI von BÜNDNIS 90/DIE GRÜNEN NRW (gruene-nrw.de). */

:root {
    --fn-dark-1: #14371f;
    --fn-dark-3: #1d3f26;
    --fn-gold: #46962b;
    --fn-gold-hover: #367a20;
    --fn-border: #3e7d47;
    --fn-body-bg: #f4f8f3;
    --fn-header-bg: #04673f;
}

/* Test-Modus-Schalter: bewusst auffaellig (Warnfarbe), sobald aktiv - man soll nicht
   versehentlich mit deaktivierter E-Mail-Validierung im Livebetrieb landen. */
.fn-testmode-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    cursor: pointer;
}

.fn-testmode-switch .form-check-input:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .25);
}

.fn-testmode-switch .form-check-label {
    font-weight: 600;
    margin-left: .5rem;
    vertical-align: middle;
}

html, body {
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: .95rem;
    background: var(--fn-body-bg);
}

.navbar {
    background: var(--fn-header-bg);
    border-bottom: none;
    padding: .6rem 1.25rem;
    min-height: 64px;
}

.fn-logo {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    line-height: 1;
}

.fn-logo-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
}

.fn-logo-text {
    display: inline-flex;
    flex-direction: column;
}

.fn-logo-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    letter-spacing: .02em;
}

.fn-logo-sub {
    font-size: .6rem;
    color: #fff;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: .85;
    margin-top: 3px;
}

.navbar-divider {
    display: inline-block;
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, .35);
    margin: 0 4px;
}

.navbar-brand {
    color: #fff !important;
    font-size: 1.2rem;
    font-weight: 600;
}

/* ===== Inhaltsbereich ===== */
.fn-page {
    max-width: 640px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

.fn-card {
    background: #fff;
    border: 1px solid #e1e4ea;
    border-radius: .5rem;
    padding: 1.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}

.fn-card h1, .fn-card h2 {
    margin-top: 0;
    color: var(--fn-dark-3);
}

/* Lange URLs als sichtbarer Linktext (z.B. https://grnnrw.fassbender.net/...) sollen
   umbrechen statt die Seite auf schmalen Bildschirmen (iPhone) breiter zu machen. */
.fn-card a {
    overflow-wrap: break-word;
    word-break: break-word;
}

.btn-fn-gold {
    background: var(--fn-gold);
    border-color: var(--fn-gold);
    color: #fff;
    font-weight: 600;
}

.btn-fn-gold:hover {
    background: var(--fn-gold-hover);
    border-color: var(--fn-gold-hover);
    color: #fff;
}

.btn-outline-fn-gold {
    background: transparent;
    border: 1px solid var(--fn-gold);
    color: var(--fn-gold);
}

.btn-outline-fn-gold:hover {
    background: var(--fn-gold);
    color: #fff;
}

.fn-download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1rem;
}

.fn-download-grid .btn {
    text-align: left;
}

.fn-footer {
    text-align: center;
    color: #8a8f98;
    font-size: .78rem;
    margin: 2rem 0 1rem;
}

.fn-details-toggle {
    display: inline-flex;
    align-items: center;
    color: var(--fn-gold);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}

.fn-details-toggle:hover {
    text-decoration: underline;
}

.fn-details-toggle .bi-chevron-right {
    transition: transform .15s ease;
}

.fn-details-toggle[aria-expanded="true"] .bi-chevron-right {
    transform: rotate(90deg);
}

/* ===== Anleitung: nummerierte Schritte + Screenshots ===== */
.fn-os-switch .btn {
    font-weight: 600;
}

.fn-jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.fn-jump-link {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border: 1px solid var(--fn-border);
    border-radius: .4rem;
    background: var(--fn-body-bg);
    color: var(--fn-dark-3);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}

.fn-jump-link:hover {
    background: #fff;
    border-color: var(--fn-gold);
    color: var(--fn-gold);
}

/* Damit Sprungziele nicht unter der fixierten Navbar verschwinden. */
h2[id] {
    scroll-margin-top: 80px;
}

.fn-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fn-step-num {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--fn-gold);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fn-step-body {
    flex: 1 1 auto;
    min-width: 0;
}

.fn-step-body p {
    margin-bottom: .6rem;
}

.fn-shot {
    margin-top: .25rem;
}

.fn-shot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 160px;
    border: 1px dashed var(--fn-border);
    border-radius: .5rem;
    background: #f4f8f3;
    color: #8a8f98;
    font-size: .85rem;
}

.fn-shot-placeholder i {
    font-size: 1.6rem;
}

.fn-shot img {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: .5rem;
    border: 1px solid var(--fn-border);
}

/* ===== Verbindungstest-Modal: Parameter-Übersicht ===== */
.fn-test-params-table {
    background: #f4f8f3;
    border: 1px solid #e1e4ea;
    border-radius: .4rem;
    overflow: hidden;
    font-size: .85rem;
}

.fn-test-params-table th,
.fn-test-params-table td {
    padding: .35rem .6rem;
    vertical-align: top;
}

.fn-test-params-table th {
    width: 40%;
    color: #5a6270;
    font-weight: 600;
    white-space: nowrap;
}

.fn-test-params-table td {
    word-break: break-all;
}

/* ===== Migration: hervorgehobene Links ===== */
.fn-migration-link {
    margin-bottom: .5rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.fn-migration-link a {
    color: var(--fn-gold);
    text-decoration: none;
}

.fn-migration-link a:hover {
    text-decoration: underline;
}

/* ===== Kacheln (z.B. Profilgenerator / Anleitung) ===== */
.fn-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 576px) {
    .fn-tile-grid {
        grid-template-columns: 1fr;
    }
}

.fn-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    padding: 1.25rem;
    border-radius: .25rem;
    background: rgba(70, 150, 43, .12);
    text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}

.fn-tile:hover {
    background: rgba(70, 150, 43, .2);
    transform: translateY(-1px);
}

.fn-tile-icon {
    font-size: 1.7rem;
    color: var(--fn-gold);
    margin-bottom: .25rem;
}

.fn-tile-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--fn-dark-3);
}

.fn-tile-desc {
    font-size: .85rem;
    color: #5a6270;
    margin-bottom: .5rem;
}

.fn-tile-btn {
    background: #2b8554;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem .8rem;
    border-radius: .2rem;
}

.fn-debug-log {
    background: #14371f;
    color: #d7ecd9;
    border-radius: .4rem;
    padding: .75rem;
    font-size: .78rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
}
