/* Kopfkunst Kunden-App – interaktive Website-Vorschau */

.kk-preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    max-width: 340px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .kk-preview-wrap {
        margin: 0 0 0 auto;
        max-width: 360px;
    }
}

.kk-preview-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.65rem;
    width: 100%;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #636366;
    text-align: center;
}

.kk-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 980px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-dark, #ad1457);
    background: rgba(233, 30, 99, 0.1);
    border: 1px solid rgba(233, 30, 99, 0.18);
    white-space: nowrap;
}

.kk-preview-note {
    font-size: 0.72rem;
    color: #8e8e93;
}

.kk-phone {
    --kk-pink: #e91e63;
    --kk-pink-dark: #d81b60;
    --kk-pink-soft: rgba(233, 30, 99, 0.1);
    --kk-bg: #fffdfc;
    --kk-card: #ffffff;
    --kk-text: #1c1c1e;
    --kk-muted: #8e8e93;
    --kk-border: rgba(233, 30, 99, 0.12);
    --kk-radius: 18px;
    --kk-tab-h: 52px;

    width: min(100%, 300px);
    background: #1c1c1e;
    border-radius: 44px;
    padding: 10px;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 0 2px #2c2c2e;
    position: relative;
}

.kk-phone::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 28px;
    background: #1c1c1e;
    border-radius: 20px;
    z-index: 20;
}

.kk-phone-inner {
    background: var(--kk-bg);
    border-radius: 36px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 620px;
    position: relative;
}

.kk-demo-watermark {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: rgba(233, 30, 99, 0.06);
    transform: rotate(-24deg);
    user-select: none;
}

.kk-preview--subscreen .kk-tabbar {
    opacity: 0.45;
    pointer-events: none;
}

.kk-statusbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--kk-text);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.kk-statusbar-icons {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.62rem;
}

.kk-screens {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.kk-screen {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 14px 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(12px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    scrollbar-width: none;
}

.kk-screen::-webkit-scrollbar {
    display: none;
}

.kk-screen.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    position: relative;
}

/* Typography */
.kk-greeting {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--kk-text);
    margin: 0 0 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.kk-sub {
    font-size: 0.72rem;
    color: var(--kk-muted);
    margin: 0;
    line-height: 1.35;
}

.kk-page-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--kk-text);
    margin: 0 0 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.kk-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--kk-text);
    margin: 0 0 8px;
}

.kk-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kk-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.kk-bell {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--kk-pink-soft);
    color: var(--kk-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    border: none;
    padding: 0;
    cursor: pointer;
}

.kk-interactive {
    cursor: default;
}

/* Klickbare Demo-Elemente */
.kk-tappable {
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.kk-tappable::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.45);
    pointer-events: none;
    opacity: 0.85;
}

.kk-tappable:hover::after,
.kk-tappable:focus-visible::after {
    box-shadow: 0 0 0 2px var(--kk-pink), 0 0 0 5px rgba(233, 30, 99, 0.18);
    opacity: 1;
}

.kk-tappable:active {
    transform: scale(0.98);
}

.kk-bell.kk-tappable::after {
    border-radius: 50%;
}

.kk-stat.kk-tappable::after {
    border-radius: var(--kk-radius);
}

.kk-settings-row.kk-tappable::after {
    inset: 2px 4px;
    border-radius: 10px;
}

.kk-settings-row.kk-tappable i.fa-chevron-right {
    color: var(--kk-pink);
    font-size: 0.6rem;
}

.kk-subnav-back.kk-tappable::after {
    border-radius: 50%;
}

.kk-tabbar-btn.kk-tappable::after {
    inset: 4px 2px;
    border-radius: 10px;
}

.kk-preview-wrap.kk-preview-pulse .kk-tabbar-btn.kk-tappable::after {
    animation: kk-tap-pulse 1.6s ease-in-out 3;
}

@keyframes kk-tap-pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.35);
    }
    50% {
        box-shadow: 0 0 0 2px var(--kk-pink), 0 0 0 6px rgba(233, 30, 99, 0.25);
    }
}

.kk-tabbar--tappable {
    position: relative;
}

/* Mobile: Start-Karte statt Phone-Rahmen */
.kk-preview-launcher {
    display: none;
    width: 100%;
}

.kk-launcher-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.15rem 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(233, 30, 99, 0.12);
}

.kk-launcher-icon {
    width: 56px;
    height: 56px;
    border-radius: 22.5%;
    object-fit: cover;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.12);
}

.kk-launcher-note {
    font-size: 0.72rem;
    color: #8e8e93;
    margin: 0.65rem 0 0;
    line-height: 1.35;
}

.kk-preview-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 980px;
    background: linear-gradient(135deg, var(--primary-color, #e91e63) 0%, var(--primary-dark, #d81b60) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(233, 30, 99, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kk-preview-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(233, 30, 99, 0.32);
}

.kk-preview-start-btn:focus-visible {
    outline: 2px solid var(--primary-color, #e91e63);
    outline-offset: 3px;
}

.kk-preview-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.kk-preview-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: auto;
    padding: 0.4rem 0.85rem;
    border: none;
    border-radius: 980px;
    background: #f2f2f7;
    color: #48484a;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    margin-bottom: 0.65rem;
    align-self: center;
}

@media (max-width: 991px) {
    .kk-preview-wrap {
        margin-top: 1.25rem;
    }

    .kk-preview-meta {
        display: none;
    }

    .kk-preview-launcher {
        display: block;
    }

    .kk-preview-wrap:not(.is-started) .kk-preview-stage {
        display: none;
    }

    .kk-preview-wrap.is-started .kk-preview-launcher {
        display: none;
    }

    .kk-preview-wrap.is-started .kk-preview-stage {
        display: flex;
        position: relative;
        width: 100%;
        padding: 0;
    }

    .kk-preview-wrap.is-started .kk-preview-close-btn {
        display: inline-flex;
        background: #fff;
        color: var(--primary-dark, #ad1457);
        border: 1px solid rgba(233, 30, 99, 0.2);
        box-shadow: 0 2px 8px rgba(233, 30, 99, 0.08);
    }

    .kk-launcher-card {
        background: #fff;
        border: 1px solid rgba(233, 30, 99, 0.1);
        box-shadow: 0 4px 16px rgba(233, 30, 99, 0.06);
    }

    .kk-phone {
        background: linear-gradient(160deg, #fff 0%, var(--primary-lighter, #fce4ec) 100%);
        padding: 8px;
        box-shadow:
            0 8px 28px rgba(233, 30, 99, 0.1),
            0 0 0 1px rgba(233, 30, 99, 0.12);
    }

    .kk-phone::before {
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(0, 0, 0, 0.06);
        height: 24px;
    }
}

button.kk-stat,
button.kk-settings-row {
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: inherit;
    width: 100%;
}

button.kk-bell {
    cursor: pointer;
    flex-shrink: 0;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
}

button.kk-stat {
    border: none;
    text-align: left;
}

button.kk-settings-row {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.kk-bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--kk-pink);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--kk-bg);
}

.kk-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 980px;
    font-size: 0.65rem;
    font-weight: 600;
}

.kk-pill--open {
    background: rgba(22, 115, 120, 0.12);
    color: #167378;
}

.kk-pill--open::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #167378;
}

.kk-btn-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: var(--kk-radius);
    background: linear-gradient(135deg, var(--kk-pink) 0%, var(--kk-pink-dark) 100%);
    color: #fff;
    text-align: left;
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.28);
}

.kk-btn-primary i.fa-chevron-right {
    margin-left: auto;
    opacity: 0.85;
    font-size: 0.7rem;
}

.kk-btn-primary-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}

.kk-btn-primary-sub {
    display: block;
    font-size: 0.62rem;
    opacity: 0.88;
    margin-top: 1px;
}

.kk-btn-primary > i:first-child {
    font-size: 1rem;
}

.kk-banner-voucher {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--kk-radius);
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.08) 0%, rgba(248, 187, 208, 0.35) 100%);
    border: 1px solid var(--kk-border);
}

.kk-banner-voucher i {
    color: var(--kk-pink);
    font-size: 1rem;
}

.kk-banner-voucher strong {
    display: block;
    font-size: 0.72rem;
    color: var(--kk-text);
}

.kk-banner-voucher span {
    font-size: 0.62rem;
    color: var(--kk-muted);
}

.kk-banner-driving {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--kk-radius);
    background: linear-gradient(135deg, rgba(22, 115, 120, 0.1) 0%, rgba(22, 115, 120, 0.04) 100%);
    border: 1px solid rgba(22, 115, 120, 0.18);
}

.kk-banner-driving i {
    color: #167378;
    font-size: 1rem;
}

.kk-banner-driving strong {
    display: block;
    font-size: 0.72rem;
    color: var(--kk-text);
}

.kk-banner-driving span {
    font-size: 0.62rem;
    color: var(--kk-muted);
}

.kk-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.kk-stat {
    padding: 10px 12px;
    border-radius: var(--kk-radius);
    background: var(--kk-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.kk-stat i {
    color: var(--kk-pink);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.kk-stat-val {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    color: var(--kk-text);
    font-variant-numeric: tabular-nums;
}

.kk-stat-label {
    font-size: 0.58rem;
    color: var(--kk-muted);
    margin-top: 2px;
    line-height: 1.25;
}

.kk-card {
    border-radius: var(--kk-radius);
    background: var(--kk-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.kk-card-padded {
    padding: 12px 14px;
}

.kk-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.kk-list-row + .kk-list-row {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.kk-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--kk-pink-soft);
    color: var(--kk-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.kk-list-main {
    flex: 1;
    min-width: 0;
}

.kk-list-main strong {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--kk-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kk-list-main span {
    font-size: 0.62rem;
    color: var(--kk-muted);
}

.kk-list-price {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--kk-text);
    flex-shrink: 0;
}

.kk-appt-date {
    text-align: center;
    flex-shrink: 0;
    min-width: 38px;
}

.kk-appt-date .day {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--kk-pink);
    line-height: 1;
}

.kk-appt-date .mon {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--kk-muted);
    text-transform: uppercase;
}

.kk-badge-status {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(22, 115, 120, 0.12);
    color: #167378;
}

.kk-badge-status--past {
    background: #f2f2f7;
    color: #8e8e93;
}

.kk-qr-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border-radius: var(--kk-radius);
    border: 2px dashed rgba(233, 30, 99, 0.35);
    background: var(--kk-pink-soft);
    color: var(--kk-text);
    text-align: left;
}

.kk-qr-btn i {
    font-size: 1.4rem;
    color: var(--kk-pink);
}

.kk-qr-btn strong {
    display: block;
    font-size: 0.78rem;
}

.kk-qr-btn span {
    font-size: 0.62rem;
    color: var(--kk-muted);
}

.kk-invoice-amt {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--kk-text);
}

.kk-invoice-pts {
    font-size: 0.58rem;
    color: var(--kk-pink);
    font-weight: 600;
}

.kk-settings-group {
    margin-bottom: 10px;
}

.kk-settings-label {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--kk-muted);
    margin: 0 0 4px 4px;
}

.kk-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.kk-settings-row + .kk-settings-row {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.kk-settings-row i.row-icon {
    width: 28px;
    text-align: center;
    color: var(--kk-pink);
    font-size: 0.85rem;
}

.kk-settings-row .label {
    flex: 1;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--kk-text);
}

.kk-settings-row .sub {
    display: block;
    font-size: 0.58rem;
    color: var(--kk-muted);
    font-weight: 400;
}

.kk-settings-row i.fa-chevron-right {
    font-size: 0.55rem;
    color: #c7c7cc;
}

.kk-tabbar {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    height: var(--kk-tab-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.kk-tabbar-btn {
    flex: 1;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px 8px;
    color: var(--kk-muted);
    font-size: 0.52rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.kk-tabbar-btn i {
    font-size: 1.05rem;
}

.kk-tabbar-btn.is-active {
    color: var(--kk-pink);
}

.kk-tabbar-btn:focus-visible {
    outline: 2px solid var(--kk-pink);
    outline-offset: -2px;
}

/* Sub-screens (Mitteilungen, Treuepunkte) */
.kk-subscreen {
    position: absolute;
    inset: 0;
    z-index: 12;
    background: var(--kk-bg);
    overflow-y: auto;
    padding: 8px 14px 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
    scrollbar-width: none;
}

.kk-subscreen::-webkit-scrollbar {
    display: none;
}

.kk-subscreen.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.kk-subnav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.kk-subnav-back {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--kk-pink-soft);
    color: var(--kk-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.kk-subnav-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--kk-text);
}

.kk-notif-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--kk-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kk-notif-item--unread {
    border-left: 3px solid var(--kk-pink);
}

.kk-notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--kk-pink-soft);
    color: var(--kk-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.kk-notif-body strong {
    display: block;
    font-size: 0.72rem;
    color: var(--kk-text);
    margin-bottom: 2px;
}

.kk-notif-body span {
    display: block;
    font-size: 0.62rem;
    color: var(--kk-muted);
    line-height: 1.35;
}

.kk-notif-body time {
    display: block;
    font-size: 0.55rem;
    color: #aeaeb2;
    margin-top: 4px;
}

.kk-loyalty-hero {
    text-align: center;
    padding: 16px 12px;
    border-radius: var(--kk-radius);
    background: linear-gradient(160deg, rgba(233, 30, 99, 0.1) 0%, rgba(248, 187, 208, 0.35) 100%);
    border: 1px solid var(--kk-border);
}

.kk-loyalty-tier {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--kk-pink-dark);
    margin-bottom: 4px;
}

.kk-loyalty-points {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--kk-text);
}

.kk-loyalty-label {
    font-size: 0.65rem;
    color: var(--kk-muted);
}

.kk-loyalty-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.7);
    margin: 10px 0 6px;
    overflow: hidden;
}

.kk-loyalty-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--kk-pink), var(--kk-pink-dark));
}

@media (min-width: 992px) {
    .app-hero-layout {
        align-items: center;
    }

    .kk-phone {
        width: 320px;
    }
}
