@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

/* ── Hero ─────────────────────────────────────────────── */
.tips-hero {
    position: relative;
    width: 100%;
    padding: 80px 24px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse 90% 70% at 50% 0%, #1a4a22 0%, #0a1f0e 70%);
    margin-top: -24px;
}

.tips-hero-bg {
    position: absolute;
    inset: 0;
    opacity: .05;
    background-image: radial-gradient(circle, #4ade80 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.tips-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 222, 128, .1);
    border: 1px solid rgba(74, 222, 128, .25);
    color: #4ade80;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 99px;
    margin-bottom: 22px;
}

.tips-title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 3.2rem);
    line-height: 1.1;
    text-align: center;
    color: #f0faf0;
    max-width: 620px;
    margin-bottom: 14px;
}

.tips-title em {
    font-style: italic;
    font-weight: 300;
    color: #4ade80;
}

.tips-sub {
    color: #7aad7a;
    font-size: 15px;
    text-align: center;
    max-width: 420px;
    line-height: 1.6;
    margin-bottom: 36px;
}

.tips-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a9e5c, #0d6e40);
    color: #fff;
    border: none;
    padding: 15px 32px;
    border-radius: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 24px rgba(26, 158, 92, .45);
}

.tips-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(26, 158, 92, .55);
}

.tips-btn-icon {
    font-size: 18px;
    display: inline-block;
    transition: transform .5s ease;
}

/* ── Tip Card ─────────────────────────────────────────── */
.tips-card-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.tips-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
    padding: 36px 40px;
    position: relative;
    overflow: hidden;
}

.tips-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4ade80, transparent);
}

.tips-card-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #4ade80;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-card-label::before {
    content: '';
    width: 20px;
    height: 1px;
    background: #4ade80;
}

.tips-card-text {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.7;
    color: #d4edcf;
    min-height: 80px;
    transition: opacity .3s;
}

.tips-card-text.loading {
    color: #3a5e3a;
    animation: tipPulse 1.2s infinite;
}

@keyframes tipPulse {
    0%, 100% { opacity: .4; }
    50%       { opacity: .8; }
}

.tips-card-footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding-top: 16px;
}

.tips-card-count {
    font-size: 12px;
    color: #3a6e3a;
}

.tips-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #4ade80;
    background: rgba(74, 222, 128, .08);
    border: 1px solid rgba(74, 222, 128, .2);
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
    transition: background .2s;
    font-family: 'DM Sans', sans-serif;
}

.tips-copy-btn:hover {
    background: rgba(74, 222, 128, .15);
}

/* ── Chat Bubble ─────────────────────────────────────── */
#chatBubble {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #1a9e5c, #0f7a43);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
    animation: bubblePulse 3s infinite;
}

@keyframes bubblePulse {
    0%, 100% { box-shadow: 0 4px 18px rgba(26,158,92,.5), 0 0 0 0 rgba(26,158,92,.25); }
    50%       { box-shadow: 0 4px 18px rgba(26,158,92,.5), 0 0 0 10px rgba(26,158,92,0); }
}

#chatBubble:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(26,158,92,.55);
    animation: none;
}

/* ── Chat Window ─────────────────────────────────────── */
#chatBox {
    display: none;
    position: fixed;
    bottom: 98px;
    right: 28px;
    width: 340px;
    height: 460px;
    background: #0f2a14;
    border: 1px solid rgba(74,222,128,.18);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    transform-origin: bottom right;
}

#chatBox.open {
    display: flex;
    animation: chatPopIn .3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes chatPopIn {
    from { opacity: 0; transform: scale(.85) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Chat Header ─────────────────────────────────────── */
#chatHeader {
    background: linear-gradient(135deg, #1a4a22, #0f2a14);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(74,222,128,.1);
}

#chatHeader .status-dot {
    width: 8px; height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: statusBlink 2s infinite;
    flex-shrink: 0;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .25; }
}

#chatHeader .chat-title {
    font-weight: 600;
    font-size: 14px;
    color: #d4edcf;
    flex: 1;
}

.close-btn {
    color: #4a6e4a;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: color .15s;
}

.close-btn:hover { color: #4ade80; }
/* Dichtklap animatie */
#chatBox.closing {
    animation: popOut .25s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes popOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.85) translateY(12px); }
}
/* ── Messages ────────────────────────────────────────── */
#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    scroll-behavior: smooth;
}

#chatMessages::-webkit-scrollbar { width: 3px; }
#chatMessages::-webkit-scrollbar-track { background: transparent; }
#chatMessages::-webkit-scrollbar-thumb { background: #1a4a22; border-radius: 4px; }

.msg-user, .msg-bot {
    max-width: 82%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    animation: msgSlideIn .2s ease;
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.msg-user {
    background: linear-gradient(135deg, #1a9e5c, #0d6e40);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.msg-bot {
    background: #162e1a;
    color: #b8dfc0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(74,222,128,.08);
}

.msg-bot.typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 16px;
}

.typing-dot {
    width: 7px; height: 7px;
    background: #2a5e2a;
    border-radius: 50%;
    animation: typeBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

@keyframes typeBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%            { transform: translateY(-5px); }
}

/* ── Input Area ──────────────────────────────────────── */
#chatInputArea {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(74,222,128,.1);
    background: #0a1f0e;
}

#chatInput {
    flex: 1;
    background: #162e1a;
    border: 1px solid rgba(74,222,128,.15);
    border-radius: 22px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-family: 'DM Sans', sans-serif;
    color: #d4edcf;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

#chatInput::placeholder { color: #2a4e2a; }

#chatInput:focus {
    border-color: rgba(74,222,128,.4);
    box-shadow: 0 0 0 3px rgba(74,222,128,.06);
}

#chatInputArea button {
    background: linear-gradient(135deg, #1a9e5c, #0d6e40);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
    box-shadow: 0 2px 10px rgba(26,158,92,.35);
}

#chatInputArea button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(26,158,92,.5);
}

/* ── Light mode overrides ────────────────────────────── */
body:not(.dark) .tips-hero {
    background: radial-gradient(ellipse 90% 70% at 50% 0%, #e8f5e3 0%, #f4faf0 70%);
}

body:not(.dark) .tips-hero-bg {
    opacity: .08;
    background-image: radial-gradient(circle, #198754 1px, transparent 1px);
}

body:not(.dark) .tips-badge {
    background: rgba(25,135,84,.08);
    border-color: rgba(25,135,84,.2);
    color: #198754;
}

body:not(.dark) .tips-title { color: #0a2e10; }
body:not(.dark) .tips-title em { color: #198754; }
body:not(.dark) .tips-sub { color: #4a7a54; }

body:not(.dark) .tips-card {
    background: white;
    border-color: rgba(25,135,84,.1);
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

body:not(.dark) .tips-card::before {
    background: linear-gradient(90deg, transparent, #198754, transparent);
}

body:not(.dark) .tips-card-label { color: #198754; }
body:not(.dark) .tips-card-label::before { background: #198754; }
body:not(.dark) .tips-card-text { color: #1a3a20; }
body:not(.dark) .tips-card-text.loading { color: #aacaaa; }
body:not(.dark) .tips-card-count { color: #8aaa8a; }
body:not(.dark) .tips-copy-btn { color: #198754; border-color: rgba(25,135,84,.25); }

body:not(.dark) #chatBox {
    background: #ffffff;
    border-color: rgba(25,135,84,.15);
}

body:not(.dark) #chatHeader {
    background: linear-gradient(135deg, #e8f5e3, #f4faf0);
    border-bottom-color: rgba(25,135,84,.1);
}

body:not(.dark) #chatHeader .status-dot { background: #198754; }
body:not(.dark) #chatHeader .chat-title { color: #1a3a20; }
body:not(.dark) .close-btn { color: #9aca9a; }
body:not(.dark) .close-btn:hover { color: #198754; }

body:not(.dark) .msg-bot {
    background: #f4f7f5;
    color: #1a3a20;
    border-color: rgba(25,135,84,.08);
}

body:not(.dark) #chatInput {
    background: white;
    color: #1a3a20;
    border-color: #d0e8d8;
}

body:not(.dark) #chatInput::placeholder { color: #9aca9a; }
body:not(.dark) #chatInput:focus { border-color: #198754; }
body:not(.dark) #chatInputArea { background: #fafcfb; border-top-color: rgba(25,135,84,.08); }
body:not(.dark) .typing-dot { background: #c0dcc0; }
body:not(.dark) #chatMessages::-webkit-scrollbar-thumb { background: #d0e8d8; }