/* ============================================
   Sina Suno – KI-Pflegedokumentation
   Stylesheet
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #FDFBF9;
    --surface: #FFF;
    --surface-alt: #F5F3F0;
    --border: #E5E0DA;
    --accent: #FFF75D;
    --accent-dark: #BFB800;
    --accent-soft: #FFFDE6;
    --accent-mid: #FFF9A3;
    --text-p: #1A1A1A;
    --text-s: #4A4A4A;
    --text-m: #8A8A8A;
    --blue: #3B82F6;
    --blue-dark: #2563EB;
    --blue-soft: #EFF6FF;
    --warn-bg: #FFFCF0;
    --warn-text: #96750C;
    --warn-icon: #C49108;
    --shadow-xs: 0 1px 2px rgba(26,26,26,.03);
    --shadow-sm: 0 1px 4px rgba(26,26,26,.05);
    --shadow-md: 0 4px 20px rgba(26,26,26,.06);
    --shadow-lg: 0 8px 40px rgba(26,26,26,.08);
    --r: 16px;
    --rs: 10px;
    --rxs: 8px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "minion-3-caption", serif;
    font-weight: 400;
    font-style: normal;
}

body {
    font-family: 'Roboto', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-p);
    min-height: 100dvh;
    line-height: 1.6;
}

/* Animated dot pattern – only on onboarding screen */
.ob-dots {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.ob-dots .dot-layer {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #C8C2BB .8px, transparent .8px);
    background-size: 40px 40px;
    opacity: .3;
    animation: dotPulse 6s ease-in-out infinite;
}
.ob-dots .dot-layer:nth-child(2) {
    background-image: radial-gradient(circle, #B8B0A8 .6px, transparent .6px);
    background-size: 40px 40px;
    background-position: 20px 20px;
    opacity: 0;
    animation: dotTwinkle 7s ease-in-out infinite;
}
.ob-dots .dot-layer:nth-child(3) {
    background-image: radial-gradient(circle, var(--accent) .7px, transparent .7px);
    background-size: 80px 80px;
    background-position: 10px 10px;
    opacity: 0;
    animation: dotGlow 9s ease-in-out infinite 1.5s;
}

@keyframes dotPulse {
    0%, 100% { opacity: .2; }
    50% { opacity: .38; }
}
@keyframes dotTwinkle {
    0%, 100% { opacity: 0; }
    30%, 70% { opacity: .18; }
    50% { opacity: .28; }
}
@keyframes dotGlow {
    0%, 100% { opacity: 0; }
    40%, 60% { opacity: .12; }
    50% { opacity: .2; }
}

#root {
    position: relative;
    z-index: 1;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

::selection {
    background: var(--accent-soft);
    color: var(--text-p);
}

textarea {
    font-family: 'Roboto', sans-serif;
    font-size: .925rem;
    line-height: 1.7;
    resize: vertical;
    min-height: 56px;
    max-height: 200px;
    overflow-y: auto;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeScale {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes typingDot {
    0%, 60%, 100% { opacity: .3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}
@keyframes shimmerText {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.thinking-label {
    background: linear-gradient(90deg, var(--text-s) 0%, var(--text-s) 35%, #C4A882 48%, #F4E7DD 50%, #C4A882 52%, var(--text-s) 65%, var(--text-s) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 2.5s linear infinite;
}

.au { animation: fadeUp .5s cubic-bezier(.22,1,.36,1) forwards; opacity: 0; }
.af { animation: fadeIn .35s ease forwards; }
.as { animation: fadeScale .4s cubic-bezier(.22,1,.36,1) forwards; opacity: 0; }

/* ---- Qualification Slider ---- */
.qual-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 20px;
    scrollbar-width: none;
}
.qual-slider::-webkit-scrollbar { display: none; }

.qual-slide {
    position: relative;
    flex: 0 0 164px;
    scroll-snap-align: center;
    background: #FFF;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 16px 22px;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: all .3s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
    outline: none;
    overflow: hidden;
}
.qual-slide:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.qual-slide:hover .qual-slide-bar { opacity: 1 !important; }
.qual-slide:hover .qual-slide-icon { transform: scale(1.08); }
.qual-slide:active {
    transform: translateY(-1px);
    transition-duration: .1s;
}
.qual-slide .qual-slide-watermark {
    transition: opacity .3s, transform .3s;
}
.qual-slide:hover .qual-slide-watermark {
    opacity: .07 !important;
    transform: scale(1.04);
}

/* Desktop: grid layout, no scroll */
@media (min-width: 640px) {
    .qual-slider {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow: visible;
        scroll-snap-type: none;
        gap: 18px;
        padding: 8px 0 20px;
    }
    .qual-slide {
        flex: none;
        padding: 30px 18px 26px;
    }
}

/* Small mobile: narrower cards */
@media (max-width: 400px) {
    .qual-slide {
        flex: 0 0 144px;
        padding: 22px 12px 18px;
    }
}
