/* Home Page */
/* VERBOTEN: Keine zentralen base- Klassen in dieser Datei überschreiben (Regel 011-ui-css-overrides.mdc). */
/* Base-Klassen (base-headline-h3 bis h5, base-hero, base-tile, base-grid, base-layout-*, etc.) → ausschließlich in theme1/base/ definiert. */
/* Verwendete Widget-Klassen (nur Referenz): */
/* - .base-layout-*, .base-hero, .base-grid, .base-tile, .base-tile-title, .base-tile-description → layout.css, widgets-hero.css, widgets-grid.css, widgets-tiles.css */

/* H1 auf der Home-Seite kleiner als Standard-Headline */
#home-hero-title {
    font-size: var(--font-size-h2);
}

/* Tool-Tagline unter dem Hero-Titel (Keyword Tool für Google.de) */
.home-hero-tagline {
    margin-top: 8px;
    font-size: var(--font-size-small);
    color: var(--color-text-secondary);
}

/* Hero CTA-Hinweis unter dem Suchfeld */
.home-hero-cta {
    margin-top: 12px;
    font-size: var(--font-size-small);
    color: var(--color-text-secondary);
}

/* Keyword-Suchschlitz (keywordtool.io-ähnlich) */
.home-keyword-search-wrapper {
    position: relative;
    max-width: 560px;
    margin: 24px auto 0;
}

.home-keyword-input {
    width: 100%;
    box-sizing: border-box;
}

.home-keyword-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.home-keyword-suggestions.home-keyword-suggestions-visible {
    display: block;
}

.home-keyword-suggestion-item {
    padding: 12px 18px;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    cursor: pointer;
    border-bottom: 1px solid var(--color-surface-secondary);
    transition: background 0.15s ease;
}

.home-keyword-suggestion-item:last-child {
    border-bottom: none;
}

.home-keyword-suggestion-item:hover,
.home-keyword-suggestion-item:focus {
    background: var(--color-surface-secondary);
    outline: none;
}

/* Formular Keyword + Absenden */
.home-keyword-form {
    max-width: 560px;
    margin: 24px auto 0;
}

.home-keyword-submit {
    margin-top: 16px;
}

/* ========== Ergebnisseite: hochwertige Darstellung ========== */

#results-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

#results-header {
    margin-bottom: 28px;
}

#results-headline {
    font-size: var(--font-size-h2);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

#results-header .base-content-text {
    font-size: var(--font-size-small);
    color: var(--color-text-secondary);
}

#results-header .base-content-text a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

#results-header .base-content-text a:hover {
    text-decoration: underline;
}

/* Kurze Erklärung über den Tabellen */
.results-intro {
    margin-bottom: 16px;
    color: var(--color-text-secondary);
    max-width: 56em;
}

#results-frequency-section .results-intro {
    margin-top: 0;
    margin-bottom: 16px;
}

/* Tabelle: Karten-Optik, klare Struktur (nur Ergebnisseite) */
#results-table-section .base-div-table-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border);
    background: var(--color-background);
}

#results-table-section #results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

#results-table-section #results-table thead {
    background: var(--color-table-header-bg);
}

#results-table-section #results-table th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 600;
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
}

#results-table-section #results-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s ease;
}

#results-table-section #results-table tbody tr:last-child {
    border-bottom: none;
}

#results-table-section #results-table tbody tr:hover {
    background: var(--color-table-row-hover-bg);
}

#results-table-section #results-table td {
    padding: 16px 20px;
    vertical-align: top;
    color: var(--color-text);
}

#results-table-section #results-table td:first-child {
    font-weight: 500;
    color: var(--color-primary);
    white-space: nowrap;
    width: 1%;
}

/* Erweiterung als kleines Badge (keyword + suffix) */
#results-table-section #results-table td[data-suffix] {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
}

/* Vorschlagsliste: hochwertige Listenoptik */
.results-suggestion-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--font-size-base);
    line-height: 1.55;
}

.results-suggestion-list li {
    position: relative;
    padding: 6px 0 6px 18px;
    margin: 0;
    border-bottom: 1px solid var(--color-surface-secondary);
}

.results-suggestion-list li:last-child {
    border-bottom: none;
}

.results-suggestion-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.7;
}

/* Leere Zelle */
#results-table-section #results-table td .base-content-text {
    color: var(--color-text-secondary);
    font-style: normal;
}

/* Häufigkeitstabelle: gleiche Optik wie Ergebnistabelle */
#results-frequency-section {
    margin-top: 40px;
}

#results-frequency-section .base-headline-h2 {
    font-size: var(--font-size-h3);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

#results-frequency-section .base-div-table-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border);
    background: var(--color-background);
}

#results-frequency-section #results-frequency-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

#results-frequency-section #results-frequency-table thead {
    background: var(--color-table-header-bg);
}

#results-frequency-section #results-frequency-table th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 600;
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
}

#results-frequency-section #results-frequency-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s ease;
}

#results-frequency-section #results-frequency-table tbody tr:last-child {
    border-bottom: none;
}

#results-frequency-section #results-frequency-table tbody tr:hover {
    background: var(--color-table-row-hover-bg);
}

#results-frequency-section #results-frequency-table td {
    padding: 16px 20px;
    vertical-align: top;
    color: var(--color-text);
}

#results-frequency-section #results-frequency-table td:first-child {
    font-weight: 500;
    color: var(--color-primary);
}

/* Anzahl-Spalte rechtsbündig: auf einen Blick die häufigsten Keywords oben, Zahlen vergleichbar */
#results-frequency-section #results-frequency-table th:last-child,
#results-frequency-section #results-frequency-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

/* Mobile: Treffer-Ergebnisse optimiert (Breakpoint 576px per 011-ui-mobile.mdc) */
@media (max-width: 576px) {
    #results-container {
        padding: 24px 3px 40px;
        max-width: 100%;
        box-sizing: border-box;
    }

    #results-headline {
        font-size: var(--font-size-h3);
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    #results-header .base-content-text {
        margin-top: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .results-intro {
        margin-bottom: 12px;
        font-size: var(--font-size-small);
    }

    #results-table-section .base-div-table-wrapper {
        border-radius: 12px;
        max-width: 100%;
        box-sizing: border-box;
    }

    #results-table-section .base-div-table-body .base-div-table-cell {
        padding: 12px 16px;
        font-size: var(--font-size-small);
    }

    .results-suggestion-list li {
        padding: 6px 0 6px 14px;
        font-size: var(--font-size-small);
    }

    .results-suggestion-list li::before {
        top: 10px;
    }

    #results-frequency-section {
        margin-top: 28px;
    }
}

/* Tablet: Treffer-Ergebnisse (600px–1023px) */
@media (min-width: 600px) and (max-width: 1023px) {
    #results-container {
        padding: 20px 24px 40px;
    }

    #results-headline {
        font-size: var(--font-size-h2);
    }

    #results-table-section .base-div-table-body .base-div-table-cell,
    #results-frequency-section .base-div-table-body .base-div-table-cell {
        padding: 14px 18px;
    }
}
