/**
 * Star Kreditrechner – Custom Stylesheet
 *
 * All Kreditrechner-specific styles live here.
 * Tailwind utility classes are loaded via wp_enqueue_script (CDN).
 * Google Fonts (Poppins) are loaded via wp_enqueue_style.
 */

/* ── Base ──────────────────────────────────────────────────────────────── */

.star-kreditrechner-wrapper {
    font-family: 'Poppins', sans-serif;
    background-color: transparent;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.star-kreditrechner-wrapper * {
    box-sizing: border-box;
}

/* ── Range Slider ───────────────────────────────────────────────────────── */

.kc-slider {
    -webkit-appearance: none;
    height: 8px;
    border-radius: 5px;
    background: #d1d5db;
    outline: none;
    width: 100%;
}

.kc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kc-slider::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.kc-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.kc-slider::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.kc-card {
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.kc-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 10px 25px -5px rgba(59, 130, 246, 0.1),
        0 8px 10px -6px rgba(59, 130, 246, 0.1);
}

.kc-result-card {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ── Calculating overlay ────────────────────────────────────────────────── */

.kc-calculating-overlay {
    opacity: 0.6;
    pointer-events: none;
    filter: blur(2px);
    transition: all 0.2s ease;
}

/* ── Equal-height grid ──────────────────────────────────────────────────── */

.kc-equal-height-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .kc-equal-height-container {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 1fr;
    }
}

/* ── Interest-rate Gauge (Zinstacho) ────────────────────────────────────── */

.kc-gauge {
    position: relative;
    width: 100%;
    height: 180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.kc-gauge-arc {
    position: relative;
    width: 200px;
    height: 100px;
    border-top-left-radius: 100px;
    border-top-right-radius: 100px;
    background: linear-gradient(90deg, #22c55e 0%, #eab308 50%, #ef4444 100%);
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kc-gauge-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 90px;
    border-top-left-radius: 90px;
    border-top-right-radius: 90px;
    background-color: white;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kc-gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 100px;
    background-color: #1e293b;
    transform-origin: bottom center;
    transform: rotate(0deg);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.kc-gauge-needle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -8px;
    width: 20px;
    height: 20px;
    background-color: #1e293b;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(30, 41, 59, 0.2);
}

.kc-gauge-labels {
    position: relative;
    width: 200px;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: 10px;
}

.kc-gauge-tick {
    position: absolute;
    bottom: 0;
    width: 2px;
    height: 10px;
    background-color: rgba(30, 41, 59, 0.3);
    transform-origin: bottom center;
}

.kc-gauge-value-bg {
    position: absolute;
    bottom: 45%;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kc-gauge-value {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e293b;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 20;
    transition: all 0.5s ease;
    padding: 10px;
}

/* ── Tooltip ────────────────────────────────────────────────────────────── */





/* ── Info button (blinking) ─────────────────────────────────────────────── */

.kc-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e0f2fe;
    color: #3b82f6;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: kc-blink 1.2s infinite;
}

.kc-info-button:hover {
    background-color: #bfdbfe;
}

@keyframes kc-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ── Modal ──────────────────────────────────────────────────────────────── */

.kc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding-top: 900px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .kc-modal {
        padding-top: 0;
    }
}

.kc-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 80%;
    max-width: 500px;
    position: relative;
}

.kc-close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.kc-close-modal:hover {
    color: #000;
    text-decoration: none;
}

.kc-modal-title {
    padding-right: 20px;
    margin-bottom: 15px;
    font-size: 1.125rem;
    font-weight: 600;
}

.kc-modal-paragraph {
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.kc-modal-paragraph:last-child {
    margin-bottom: 0;
}

/* ── CTA Button „Unverbindliche Offerte" ────────────────────────────────── */

.calculate-btn-credit-offer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 22px;
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease,
                transform 0.18s ease, box-shadow 0.22s ease;
    margin-top: 1rem;
    position: relative;
}

/* Double-chevron icon via pseudo-element (replaces calculator icon) */
.calculate-btn-credit-offer .fa-calculator {
    display: none;
}

.calculate-btn-credit-offer::after {
    content: '\00BB\00BB'; /* »» */
    margin-left: 10px;
    font-size: 1rem;
    opacity: 0.9;
    transition: transform 0.2s ease;
    font-style: normal;
}

/* Hover state */
.calculate-btn-credit-offer:hover {
    background: #ffffff;
    color: #1d4ed8;
    border-color: #ffffff;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.calculate-btn-credit-offer:hover::after {
    transform: translateX(4px);
}

/* Fix: Button-Text immer lesbar – auch nach Klick (:visited/:focus/:active) */
.calculate-btn-credit-offer:visited {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
    background: transparent;
    text-decoration: none !important;
}
.calculate-btn-credit-offer:visited::after {
    color: #ffffff;
}
.calculate-btn-credit-offer:focus {
    color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
    text-decoration: none !important;
}
.calculate-btn-credit-offer:active {
    color: #ffffff;
    transform: translateY(0);
    text-decoration: none !important;
}







/* =====================================================================
   TOOLTIP 1 – Jahreszins Inline Info
   Desktop : CSS :hover + JS centers within card
   Mobile  : JS .kc-active class → fixed, centered, NO backdrop
   ===================================================================== */
.kc-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    overflow: visible;
}

.kc-tooltip .kc-tooltip-text {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 310px;
    background: #1e293b;
    color: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.83rem;
    line-height: 1.6;
    white-space: normal;
    box-shadow: 0 12px 32px rgba(0,0,0,0.28);
    text-align: left;
    box-sizing: border-box;
    z-index: 999999;
    overflow-y: auto;
    max-height: 80vh;
}

/* Close button (hidden on desktop, shown on mobile) */
.kc-tt-close {
    display: none;
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    transition: color 0.15s;
}
.kc-tt-close:hover { color: #fff; }

/* Title */
.kc-tt-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 8px;
    padding-right: 24px; /* space for close btn on mobile */
    border-bottom: 1px solid rgba(255,255,255,0.18);
    text-align: center;
}

/* Row layout */
.kc-tt-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    line-height: 1.55;
}
.kc-tt-row:last-child { margin-bottom: 0; }
.kc-tt-icon { flex-shrink: 0; font-size: 0.95rem; margin-top: 1px; }

/* Arrow at bottom (points to trigger) */
.kc-tooltip .kc-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: var(--kc-tt-arrow, 50%);
    margin-left: -7px;
    border: 7px solid transparent;
    border-top-color: #1e293b;
}

/* ── DESKTOP: CSS hover shows tooltip ── */
@media (min-width: 768px) {
    .kc-tooltip:hover .kc-tooltip-text,
    .kc-tooltip:focus .kc-tooltip-text {
        visibility: visible;
        opacity: 1;
    }
}

/* ── MOBILE: .kc-active class → fixed, centered, NO backdrop ── */
@media (max-width: 767px) {
    /* Prevent accidental CSS-hover on touch */
    .kc-tooltip:hover .kc-tooltip-text {
        visibility: hidden !important;
        opacity: 0 !important;
    }
    /* Show on tap */
    .kc-tooltip.kc-active .kc-tooltip-text {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: min(calc(100vw - 32px), 360px) !important;
        bottom: auto !important;
        z-index: 999999 !important;
        max-height: 75vh;
        overflow-y: auto;
    }
    /* Show close button on mobile */
    .kc-tooltip.kc-active .kc-tt-close { display: block; }
    /* No arrow on mobile */
    .kc-tooltip.kc-active .kc-tooltip-text::after { display: none !important; }
    /* NO dark backdrop — removed */
}

/* =====================================================================
   MODAL – Zinstacho Info (Tooltip 2)
   ===================================================================== */
.kc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background-color: rgba(0,0,0,0.52);
    overflow-y: auto;
    padding: 24px 20px;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .kc-modal {
        align-items: center;
        justify-content: center;
    }
}
@media (max-width: 767px) {
    .kc-modal { padding: 12px; }
}

.kc-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    box-sizing: border-box;
    flex-shrink: 0;
    margin: auto;
}
@media (max-width: 767px) {
    .kc-modal-content {
        max-width: 100%;
        border-radius: 16px;
        padding: 22px 18px;
        margin-top: 8px;
    }
}
.kc-close-modal {
    position: absolute;
    top: 14px; right: 16px;
    color: #94a3b8;
    font-size: 26px; font-weight: bold;
    background: none; border: none;
    cursor: pointer; padding: 2px 6px; line-height: 1;
    transition: color 0.15s;
}
.kc-close-modal:hover { color: #1e293b; }
.kc-modal-title {
    font-size: 1.15rem; font-weight: 700;
    margin-bottom: 20px; padding-right: 32px;
    line-height: 1.4; color: #1e293b;
}
.kc-modal-paragraph {
    font-size: 0.93rem; line-height: 1.65;
    margin-bottom: 0; color: #374151;
}
.kc-modal-paragraph:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
    .kc-modal-title { font-size: 1.05rem; }
    .kc-modal-paragraph { font-size: 0.875rem; }
}

/* =====================================================================
   CTA BUTTON – Unverbindliche Offerte
   ===================================================================== */
.calculate-btn-credit-offer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 22px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.22s, color 0.22s, border-color 0.22s,
                transform 0.18s, box-shadow 0.22s;
}
.calculate-btn-credit-offer .fa-calculator { display: none; }
.calculate-btn-credit-offer::after {
    content: '\BB\BB';
    margin-left: 10px;
    font-size: 1rem;
    transition: transform 0.2s;
}
.calculate-btn-credit-offer:hover,
.calculate-btn-credit-offer:focus {
    background: #fff;
    color: #1d4ed8;
    border-color: #fff;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    outline: none;
}
.calculate-btn-credit-offer:hover::after { transform: translateX(4px); }
.calculate-btn-credit-offer:visited,
.calculate-btn-credit-offer:active {
    color: #fff !important;
    border-color: rgba(255,255,255,0.85) !important;
    background: transparent !important;
    text-decoration: none !important;
}

/* =====================================================================
   MOBILE LAYOUT: Zinstacho zuerst + kompakter Tacho
   ===================================================================== */
@media (max-width: 1023px) {
    .kc-equal-height-container > *:nth-child(3) {
        order: -1 !important;
        padding: 16px 16px 8px 16px !important;  /* bottom reduziert */
    }
    .kc-gauge { height: 130px !important; }
    .kc-gauge-arc {
        width: 160px !important;
        height: 80px !important;
        border-top-left-radius: 80px !important;
        border-top-right-radius: 80px !important;
        margin-top: 10px !important;
    }
    .kc-gauge-overlay {
        width: 144px !important;
        height: 72px !important;
        border-top-left-radius: 72px !important;
        border-top-right-radius: 72px !important;
    }
    .kc-gauge-value { font-size: 1.05rem !important; }
    .kc-gauge-labels { font-size: 0.7rem !important; }
    .kc-equal-height-container > *:nth-child(3) .border-t {
        margin-top: 4px !important;
        padding-top: 5px !important;
    }
}

/* =====================================================================
   ALLE ANZEIGEN BUTTON – Desktop + Mobile, zentriert unter Raten
   ===================================================================== */
.kc-amort-header-btn    { display: none !important; }
.kc-mobile-show-all-wrap { display: none !important; }

.kc-show-all-wrap {
    display: flex;
    justify-content: center;
    padding: 16px 0 6px;
}
.kc-show-all-btn {
    color: #1d4ed8;
    border: 1.5px solid #93c5fd;
    background: #fff;
    padding: 9px 32px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}
.kc-show-all-btn:hover,
.kc-show-all-btn:focus,
.kc-show-all-btn:active {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    opacity: 1 !important;
    outline: none !important;
}

/* Tooltip 1: nur Titel + erster Punkt sichtbar */
.kc-tooltip .kc-tooltip-text .kc-tt-row ~ .kc-tt-row {
    display: none !important;
}




/* =====================================================================
   SECTION: position:relative → Modal kann absolute positioniert werden
   ===================================================================== */
.kc-section {
    position: relative;
}

/* =====================================================================
   SLIDER – Gleichmässiger, symmetrischer Abstand (alle Regler)
   ===================================================================== */
/* Abstand zwischen Label/Wert-Zeile und Regler */
.kc-slider {
    margin-top: 0;      /* Abstand über den Regler via mb-Klassen-Override */
    display: block;
}

/* Label-Wert Zeile → grösserer Abstand vor dem Regler (Desktop + Mobile) */
.kc-card .flex.justify-between.items-center {
    margin-bottom: 22px !important;
}

/* Abstand: min/max Labels → nächste Section */
.kc-card .flex.justify-between.text-xs.text-gray-500 {
    margin-top: 6px !important;
    margin-bottom: 0 !important;
}

/* Section-Wrapper Abstände gleichmässig */
.kc-card .mb-6 {
    margin-bottom: 22px !important;
    padding-top: 0 !important;
}

/* Letzter Regler: kein Bottom-Margin */
.kc-card .mb-6:last-of-type {
    margin-bottom: 4px !important;
}

/* Mobile: Thumb grösser, Padding für Sichtbarkeit */
@media (max-width: 767px) {
    .kc-slider {
        padding: 10px 0;
        margin-top: 26px;
        height: 6px;
    }
    .kc-slider::-webkit-slider-thumb {
        width: 26px !important;
        height: 26px !important;
    }
    .kc-slider::-moz-range-thumb {
        width: 26px !important;
        height: 26px !important;
    }
    .kc-card .mb-6 {
        margin-bottom: 18px;
    }
    .kc-equal-height-container > *:nth-child(1),
    .kc-equal-height-container > *:nth-child(2) {
        padding: 16px !important;
    }
    .kc-equal-height-container {
        gap: 0.6rem !important;
    }
}

/* =====================================================================
   MODAL – Zinstacho Info
   FIX 1: Desktop = position:absolute in Section (Backdrop nur oben)
   FIX 2: Mobile  = position:fixed, Fade-Animation beim Schliessen
   ===================================================================== */

/* ── Animationen: Content-Box & Backdrop getrennt ── */
@keyframes kcFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes kcContentOut {
    /* Nur Content-Box: Scale + Fade */
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.94); }
}
@keyframes kcBackdropOut {
    /* Nur Backdrop: KEIN Scale, nur Fade (mit 80ms Verzögerung via JS) */
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Desktop Modal: ganzes Element faded ein */
.kc-modal--desktop-open:not(.kc-modal--closing) {
    animation: kcFadeIn 0.22s ease forwards;
}

/* Mobile: NUR Content-Box faded ein (Backdrop sofort ohne Animation) */
@media (max-width: 767px) {
    .kc-modal[style*="flex"]:not(.kc-modal--closing) {
        animation: none !important;
    }
    .kc-modal[style*="flex"] .kc-modal-content:not(.kc-content--closing) {
        animation: kcFadeIn 0.28s ease 0.1s both;
    }
}

/* Schliessen: Backdrop (über .kc-modal--closing) – nur Opacity */
.kc-modal--closing {
    animation: kcBackdropOut 0.2s ease forwards !important;
    pointer-events: none !important;
}

/* Schliessen: Content-Box (über .kc-content--closing) – Scale + Fade */
.kc-modal-content.kc-content--closing {
    animation: kcContentOut 0.25s ease forwards !important;
    pointer-events: none !important;
}

/* DESKTOP: Modal absolut in der Section – mit schönem Radius + Schatten */
@media (min-width: 768px) {
    .kc-modal--desktop-open {
        position: absolute !important;
        left:   0    !important;
        right:  0    !important;
        top:    0    !important;
        bottom: auto !important;
        /* Höhe wird per JS gesetzt (bis kurz vor amortCard) */
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        padding-top: 80px !important;
        padding-bottom: 20px !important;
        overflow: hidden !important;
        /* Schöner Radius + Schatten auf dem Backdrop */
        border-radius: 20px !important;
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.07) !important;
    }
}

/* MOBILE: Modal – Backdrop sofort, Content mit Abstand nach oben */
@media (max-width: 767px) {
    .kc-modal[style*="flex"] {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 40px 12px 12px 12px !important;  /* Mehr Abstand oben */
    }
    .kc-modal-content {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        max-height: calc(100dvh - 68px);
        width: 100% !important;
    }
}

/* Tooltip 1: kein Scrolltrack + saubere Transition ohne Flackern */
.kc-tooltip .kc-tooltip-text {
    overflow: visible !important;
    max-height: none !important;
    /* Schliessen: opacity faded, visibility erst NACH der fade (transition-delay) */
    transition: opacity 0.2s ease, visibility 0s linear 0.2s !important;
}
/* Öffnen: visibility sofort sichtbar, opacity faded ein */
@media (min-width: 768px) {
    .kc-tooltip:hover .kc-tooltip-text,
    .kc-tooltip:focus-within .kc-tooltip-text {
        transition: opacity 0.2s ease, visibility 0s linear 0s !important;
    }
}

/* Tooltip 1: nur Titel + erster Punkt */
.kc-tooltip .kc-tooltip-text .kc-tt-row ~ .kc-tt-row {
    display: none !important;
}

/* =====================================================================
   MOBILE: Kreditangebot Abstand zu Kreditdetails
   ===================================================================== */
@media (max-width: 767px) {
    .kc-equal-height-container > *:nth-child(2) {
        margin-top: 10px !important;
    }
}

/* =====================================================================
   MOBILE: Anklickbare Raten im Rückzahlungsplan
   ===================================================================== */
@media (max-width: 767px) {

    /* Container */
    #kcMobileAmortizationList {
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid #e5e7eb;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    /* Raten-Zeile */
    .kc-amort-row {
        background: #fff;
        border-bottom: 1px solid #f1f5f9;
        cursor: pointer;
        transition: background 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .kc-amort-row:last-child { border-bottom: none; }
    .kc-amort-row:active { background: #f8fafc; }

    /* Hauptzeile */
    .kc-amort-row-main {
        display: flex;
        align-items: center;
        padding: 13px 14px;
        gap: 10px;
    }

    .kc-amort-month {
        font-size: 0.82rem;
        font-weight: 600;
        color: #64748b;
        min-width: 52px;
    }

    .kc-amort-right {
        flex: 1;
        text-align: right;
    }

    .kc-amort-payment {
        font-size: 0.97rem;
        font-weight: 700;
        color: #1e293b;
    }

    .kc-amort-balance {
        font-size: 0.72rem;
        color: #94a3b8;
        margin-top: 2px;
    }

    /* Chevron-Pfeil */
    .kc-amort-chevron {
        font-size: 1.3rem;
        line-height: 1;
        color: #cbd5e1;
        transition: transform 0.22s ease, color 0.15s ease;
        margin-left: 2px;
        user-select: none;
    }
    .kc-amort-row--open .kc-amort-chevron {
        transform: rotate(90deg);
        color: #3b82f6;
    }

    /* Detail-Bereich: max-height Animation */
    .kc-amort-detail {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    }

    /* Detail-Inhalt */
    .kc-detail-inner {
        padding: 10px 14px 14px 14px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        border-top: 1px solid #e2e8f0;
    }

    .kc-detail-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .kc-detail-label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.76rem;
        font-weight: 600;
        color: #64748b;
        min-width: 68px;
        white-space: nowrap;
    }

    /* Farbige Punkte */
    .kc-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: inline-block;
        flex-shrink: 0;
    }
    .kc-dot--blue { background: #3b82f6; }
    .kc-dot--gold { background: #f59e0b; }

    .kc-detail-right { flex: 1; }

    /* Fortschrittsbalken */
    .kc-detail-bar {
        height: 5px;
        background: #e2e8f0;
        border-radius: 3px;
        overflow: hidden;
        margin-bottom: 5px;
    }

    .kc-detail-fill {
        height: 100%;
        border-radius: 3px;
        transition: width 0.45s ease;
    }
    .kc-detail-fill--blue { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
    .kc-detail-fill--gold { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

    .kc-detail-amount {
        font-size: 0.82rem;
        font-weight: 700;
        color: #1e293b;
    }
    .kc-detail-pct {
        font-weight: 400;
        color: #94a3b8;
        font-size: 0.74rem;
    }

    /* ── Mobile: Inline ⓘ neben Zinsteil-% ── */
    .kc-amort-info-btn-inline {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #93c5fd;
        font-size: 0.8rem;
        cursor: pointer;
        padding: 0 0 0 4px;
        vertical-align: middle;
        line-height: 1;
        transition: color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .kc-amort-info-btn-inline:active {
        color: #3b82f6;
    }
}

/* ── Desktop: ⓘ neben "Zinsen" im Tabellen-Header ── */
.kc-amort-info-btn-th {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #93c5fd;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0 0 0 4px;
    vertical-align: middle;
    line-height: 1;
    transition: color 0.2s ease, transform 0.15s ease;
}
.kc-amort-info-btn-th:hover {
    color: #3b82f6;
    transform: scale(1.15);
}
.kc-amort-info-btn-th:active {
    color: #1d4ed8;
}

/* =====================================================================
   AMORT INFO MODAL – SVG Diagramm + Tips + Dynamische Buttons
   ===================================================================== */

/* Modal-Content etwas breiter für Diagramm */
.kc-amort-modal-content {
    max-width: 440px !important;
}

/* SVG Diagramm-Container */
.kc-amort-diagram {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 16px 10px 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.kc-amort-svg {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

/* Diagramm-Legende */
.kc-diag-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.72rem;
    color: #64748b;
    justify-content: center;
}
.kc-diag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.kc-diag-dot--blue { background: #3b82f6; }
.kc-diag-dot--gold { background: #f59e0b; }

/* Tip-Karten */
.kc-amort-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kc-amort-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
}
.kc-amort-tip-icon {
    font-size: 1.1rem;
    line-height: 1.4;
    flex-shrink: 0;
}
.kc-amort-tip p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #475569;
    margin: 0;
}

/* ── Dynamische Info-Buttons (Desktop + Mobile) ── */

/* Puls-Keyframe */
@keyframes kcInfoPulse {
    0%   { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    70%  { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* Desktop: ⓘ im Zinsen-Header */
.kc-amort-info-btn-th {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border: 1.5px solid #93c5fd;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: #3b82f6;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0;
    vertical-align: middle;
    margin-left: 5px;
    transition: all 0.2s ease;
    animation: kcInfoPulse 2.5s ease-out 1s 2;  /* 2x pulsieren nach Laden */
}
.kc-amort-info-btn-th:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: scale(1.18);
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.kc-amort-info-btn-th:active {
    transform: scale(0.95);
}

/* Mobile: ⓘ inline im Zinsteil-Detail */
.kc-amort-info-btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #93c5fd;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0 0 0 5px;
    vertical-align: middle;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.kc-amort-info-btn-inline:active {
    color: #3b82f6;
    transform: scale(1.2);
}
