/* ============================================================
   RixbyCare — site.css
   Mobile-first, WCAG 2.1 AA compliant
   ============================================================ */

/* ---- Design tokens ---- */
:root {
    --rc-pink:        #ea3d8a;
    --rc-pink-dark:   #c4006e;
    --rc-pink-darker: #9e0058;
    --rc-navy:        #1e2d42;
    --rc-charcoal:    #111827;
    --rc-text:        #1e293b;
    --rc-muted:       #5a6472;
    --rc-border:      rgba(0,0,0,0.07);
    --rc-shadow-sm:   0 2px 10px rgba(0,0,0,0.06);
    --rc-shadow-md:   0 6px 24px rgba(0,0,0,0.10);
    --rc-radius:      12px;
    --rc-transition:  0.18s ease;
}

/* ---- Base typography ---- */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont,
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.72;
    color: var(--rc-text);
}

/* ---- Smooth scrolling ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Skip-to-content link (WCAG 2.4.1) ---- */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10000;
    padding: 0.75rem 1.25rem;
    background: var(--rc-pink);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 0;
    transform: translateY(-100%);
    transition: transform 0.1s;
}
.skip-link:focus {
    transform: translateY(0);
    color: #fff;
}

/* ---- Global focus indicator (WCAG 2.4.7) ---- */
:focus-visible {
    outline: 3px solid var(--rc-pink);
    outline-offset: 3px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* ---- Contrast: text-muted ≥ 5:1 on white (WCAG 1.4.3) ---- */
.text-muted {
    color: var(--rc-muted) !important;
}

/* ---- Main content padding ---- */
main > .container {
    padding-top: 48px;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
}

/* ============================================================
   HERO
   ============================================================ */
header#header {
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.14) 0%, rgba(0,0,0,0) 60%),
        url("/img/rixby-care.webp") center / cover no-repeat;
    border-radius: 0 0 6% 6%;
    min-height: clamp(180px, 30vw, 550px);
}

/* Navbar brand logo — scale on small screens */
.navbar-brand img {
    width: clamp(160px, 40vw, 300px);
    height: auto;
    transition: opacity var(--rc-transition);
}
.navbar-brand:hover img {
    opacity: 0.85;
}

/* Navbar link transitions */
.navbar-nav .nav-link {
    transition: color var(--rc-transition);
    font-size: 0.95rem;
}

/* ============================================================
   HEADINGS
   ============================================================ */

/* Brand pink h1 — applies globally so inline style="color:#ea3d8a" is
   redundant but harmless; keeping existing markup untouched.           */
main h1 {
    color: var(--rc-pink);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

main h2 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

main h3 {
    font-weight: 600;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--rc-transition);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.btn-sm {
    min-height: 36px;
}

/* CTA — pink, matches topbar */
.aanmelden-button {
    background: var(--rc-pink);
    color: #fff;
    border: none;
}
.aanmelden-button:hover,
.aanmelden-button:focus {
    background: var(--rc-pink-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(196,0,110,0.35);
}

/* Outline buttons */
.btn-outline-primary,
.btn-outline-secondary {
    transition: all var(--rc-transition);
}
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--rc-shadow-sm);
}

/* Success submit buttons */
.btn-success {
    transition: all var(--rc-transition);
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(25,135,84,0.3);
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    border-radius: var(--rc-radius) !important;
    transition: box-shadow var(--rc-transition), transform var(--rc-transition);
}

/* Content cards in grid (service cards, value-prop cards) */
.row .card.border-0.h-100:not(.card-static):hover {
    box-shadow: var(--rc-shadow-md) !important;
}

/* Non-interactive cards — no hover feedback */
.card.card-static {
    cursor: default;
    transition: none;
}

/* Sidebar / info cards */
.card.shadow-sm {
    box-shadow: var(--rc-shadow-sm) !important;
}
.card.shadow-sm:hover {
    box-shadow: var(--rc-shadow-md) !important;
}

/* Intro summary cards — only when direct child of col-12 or an offset column */
.col-12 > .card.border-0.bg-light,
[class*="offset-lg"] > .card.border-0.bg-light {
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f5ff 100%) !important;
    border-radius: var(--rc-radius) !important;
    border-left: 4px solid var(--rc-pink) !important;
}

/* ============================================================
   TYPOGRAPHY — page body
   ============================================================ */

/* Lead text */
.lead {
    font-size: 1.12rem;
    line-height: 1.65;
    color: #4b5563;
}

/* Blockquote */
.blockquote {
    border-left: 4px solid var(--rc-pink);
    padding-left: 1.25rem;
    font-style: italic;
    color: #374151;
}
.blockquote-footer {
    font-size: 0.9rem;
    color: var(--rc-muted);
}


/* ============================================================
   LIST GROUPS (service pages)
   ============================================================ */

.list-group-item.bg-transparent {
    overflow: hidden; /* BFC — text block sits beside the float, never under it */
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--rc-border) !important;
    font-size: 0.97rem;
}
.list-group-item.bg-transparent:last-child {
    border-bottom: none !important;
}
.list-group-item.bg-transparent > .badge,
.list-group-item.bg-transparent > i.fas,
.list-group-item.bg-transparent > i.fa,
.list-group-item.bg-transparent > i.fab {
    float: left;
    margin-right: 0.6rem;
    margin-top: 0.2em;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-control,
.form-select {
    min-height: 44px;
    border-radius: 8px;
    border-color: #d1d5db;
    transition: border-color var(--rc-transition), box-shadow var(--rc-transition);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--rc-pink);
    box-shadow: 0 0 0 3px rgba(234,61,138,0.15);
}

/* Required field asterisk (Yii2 ActiveForm) */
div.required > label.form-label::after,
div.required > label.col-form-label::after {
    content: " *";
    color: #c55;
}

/* Error summary */
.error-summary {
    color: #842029;
    background: #fdf7f7;
    border-left: 3px solid #842029;
    padding: 10px 20px;
    margin: 0 0 15px 0;
    border-radius: 0 8px 8px 0;
}

/* Hint text */
.hint-block {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.875rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

#footer {
    background: linear-gradient(160deg, var(--rc-navy) 0%, var(--rc-charcoal) 100%) !important;
}

#footer h6.text-secondary {
    color: #94a3b8 !important;
    letter-spacing: .06em;
}

footer > .container a {
    color: #93c5fd;
    text-decoration: none;
    transition: color var(--rc-transition);
}
footer > .container a:hover,
footer > .container a:focus {
    color: #ffffff;
    text-decoration: underline;
}

#footer img.img-fluid {
    border-radius: 6px;
    opacity: 0.93;
}

#footer .border.rounded {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(255,255,255,0.15) !important;
}

#footer .border-top.border-secondary {
    border-color: rgba(255,255,255,0.12) !important;
}

@media (max-width: 575px) {
    footer .row > [class*="col-"] {
        margin-bottom: 1.5rem;
    }
    footer .row.border-top > [class*="col-"] {
        margin-bottom: 1.25rem;
    }
}

/* ============================================================
   UTILITIES & LEGACY
   ============================================================ */

.text-rc-pink {
    color: var(--rc-pink) !important;
}

.not-set {
    color: #c55;
    font-style: italic;
}

.form-group {
    margin-bottom: 1rem;
}

/* Logout button in nav */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.75);
}
@media (max-width: 767px) {
    .nav li > form > button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}
.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: #fff;
}

/* Tables: responsive on small screens */
.table-responsive-sm {
    overflow-x: auto;
}

/* Gridview sort icons */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}
a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}
a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}
.grid-view th {
    white-space: nowrap;
}

/* ============================================================
   Chat Widget — Rixby AI Assistent
   ============================================================ */

/* Floating toggle button */
.rc-chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .75rem;
}

.rc-chat-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--rc-pink);
    color: #fff;
    border: none;
    border-radius: 2rem;
    padding: .65rem 1.1rem .65rem .9rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--rc-shadow-md);
    transition: background var(--rc-transition), transform var(--rc-transition);
}

.rc-chat-toggle:hover,
.rc-chat-toggle:focus-visible {
    background: var(--rc-pink-dark);
    transform: translateY(-2px);
    outline: 3px solid var(--rc-pink);
    outline-offset: 2px;
}

.rc-chat-label {
    white-space: nowrap;
}

/* Chat panel */
.rc-chat-panel[hidden] { display: none !important; }
.rc-chat-panel {
    width: 330px;
    max-width: calc(100vw - 2rem);
    background: #fff;
    border-radius: var(--rc-radius);
    box-shadow: var(--rc-shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: rcChatSlideIn .2s ease;
}

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

/* Header */
.rc-chat-header {
    background: var(--rc-navy);
    color: #fff;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rc-chat-header-info {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.rc-chat-header-info strong {
    display: block;
    font-size: .95rem;
    line-height: 1.2;
}

.rc-chat-header-info small {
    font-size: .72rem;
    opacity: .75;
}

.rc-chat-avatar {
    flex-shrink: 0;
}

.rc-chat-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.75);
    padding: .25rem;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
    transition: color var(--rc-transition);
}

.rc-chat-close:hover,
.rc-chat-close:focus-visible {
    color: #fff;
    outline: 2px solid rgba(255,255,255,.5);
}

/* Messages area */
.rc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: .85rem 1rem;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    background: #f9fafb;
}

.rc-msg {
    max-width: 88%;
    font-size: .875rem;
    line-height: 1.5;
}

.rc-msg p {
    margin: 0;
    padding: .55rem .8rem;
    border-radius: var(--rc-radius);
}

.rc-msg--assistant {
    align-self: flex-start;
}

.rc-msg--assistant p {
    background: #fff;
    border: 1px solid var(--rc-border);
    color: var(--rc-text);
    border-bottom-left-radius: 4px;
}

.rc-msg--user {
    align-self: flex-end;
}

.rc-msg--user p {
    background: var(--rc-pink);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Input area */
.rc-chat-input-area {
    padding: .65rem .75rem;
    border-top: 1px solid var(--rc-border);
    background: #fff;
}

.rc-chat-form {
    display: flex;
    gap: .4rem;
    align-items: center;
}

.rc-chat-form .form-control {
    flex: 1;
    font-size: .875rem;
    border-color: var(--rc-border);
}

.rc-chat-form .form-control:focus {
    border-color: var(--rc-pink);
    box-shadow: 0 0 0 .2rem rgba(234,61,138,.2);
}

.rc-chat-send {
    background: var(--rc-pink);
    color: #fff;
    border: none;
    padding: .4rem .65rem;
    flex-shrink: 0;
    border-radius: 8px;
    transition: background var(--rc-transition);
}

.rc-chat-send:hover:not(:disabled),
.rc-chat-send:focus-visible:not(:disabled) {
    background: var(--rc-pink-dark);
}

.rc-chat-send:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 400px) {
    .rc-chat-panel {
        width: calc(100vw - 2rem);
    }
    .rc-chat-label {
        display: none;
    }
    .rc-chat-toggle {
        padding: .75rem;
        border-radius: 50%;
    }
}

/* ── Top bar ───────────────────────────────────────────────────── */

/* ── Step columns / numbered steps ──────────────────────────────── */
.rc-step-col {
    color: var(--rc-navy);
    flex-shrink: 0;
    text-align: center;
    width: 2.5rem;
}
.rc-icon-muted { opacity: 0.6; }

/* ── Service page — checked list ─────────────────────────────────── */
.rc-service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rc-service-list li {
    padding: .6rem 0 .6rem 1.85rem;
    border-bottom: 1px solid rgba(0,0,0,.07);
    position: relative;
    line-height: 1.5;
}
.rc-service-list li:last-child { border-bottom: none; }
.rc-service-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--rc-pink);
    position: absolute;
    left: 0;
    top: .65rem;
    font-size: .8em;
}

/* ── Service page — bottom CTA section ───────────────────────────── */
.rc-cta-section {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border-radius: var(--rc-radius);
    padding: 2.5rem 2rem;
}

/* ── Sticky sidebar ──────────────────────────────────────────────── */
.rc-sidebar-sticky { position: sticky; top: 100px; }

/* ── Card variants ───────────────────────────────────────────────── */
.rc-card-light-gradient {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
}

/* ── CTA banner (homepage quick-callback) ────────────────────────── */
.rc-cta-banner {
    background: linear-gradient(135deg, var(--rc-navy) 0%, #1a3a5c 100%);
    color: #fff;
}
.rc-cta-banner h2 { color: #fff; }
.rc-cta-banner-lead { color: rgba(255,255,255,.8); }
.rc-cta-banner-sub  { color: rgba(255,255,255,.6); }

/* ── Footer certification/registration labels ────────────────────── */
.rc-footer-label {
    letter-spacing: .05em;
    font-size: .7rem;
}

/* ── WhatsApp circle icon ────────────────────────────────────────── */
.rc-whatsapp-circle {
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.rc-whatsapp-label { font-size: .75rem; }

/* ── Registration badges (AGB, KVK) ─────────────────────────────── */
.rc-reg-badge {
    min-width: 90px;
    background: #fff;
    color: #333;
}
.rc-reg-badge-title {
    font-size: 1rem;
    line-height: 1.2;
}
.rc-reg-badge-sub { font-size: .7rem; }

/* ── Certification logos ─────────────────────────────────────────── */
.rc-cert-logo {
    object-fit: contain;
    max-height: 58px;
}
.rc-cert-hkz {
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 5px;
    max-height: 80px;
}

/* ── Google review link ──────────────────────────────────────────── */
.rc-google-review-img  { vertical-align: middle; margin-right: 8px; }
.rc-google-review-text { color: #4285F4; font-weight: bold; }

/* ── Admin layout ────────────────────────────────────────────────── */
.rc-admin-body { background: #f4f6f9; min-height: 100vh; }

.rc-admin-nav {
    background: var(--rc-navy);
    height: 56px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.rc-admin-nav-badge {
    background: var(--rc-pink);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 2px 7px;
    border-radius: 4px;
    vertical-align: middle;
    text-transform: uppercase;
}
.rc-admin-logo-ring {
    width: 30px; height: 30px;
    background: rgba(255,255,255,.12);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rc-pink);
    font-size: .85rem;
    flex-shrink: 0;
}
.rc-admin-avatar {
    width: 28px; height: 28px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    flex-shrink: 0;
}
.rc-admin-user { font-size: .82rem; }
.rc-admin-logout-btn {
    font-size: .82rem;
    font-weight: 500;
    padding: .3rem .85rem;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.rc-admin-logout-btn:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.rc-admin-page-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.07);
    padding: .75rem 0;
}
.rc-admin-page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rc-navy);
}

/* ── Stat cards ──────────────────────────────────────────────────── */
.rc-stat-card {
    border-left: 4px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease;
}
.rc-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09) !important; }
.rc-stat-card.rc-stat-blue   { border-left-color: #3b82f6; }
.rc-stat-card.rc-stat-purple { border-left-color: #8b5cf6; }
.rc-stat-card.rc-stat-red    { border-left-color: #ef4444; }
.rc-stat-card.rc-stat-green  { border-left-color: #22c55e; }
.rc-stat-card.rc-stat-neutral{ border-left-color: #94a3b8; }
.rc-stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.rc-stat-icon-blue   { background: #eff6ff; color: #3b82f6; }
.rc-stat-icon-purple { background: #f5f3ff; color: #8b5cf6; }
.rc-stat-icon-red    { background: #fef2f2; color: #ef4444; }
.rc-stat-icon-green  { background: #f0fdf4; color: #22c55e; }
.rc-stat-icon-neutral{ background: #f1f5f9; color: #64748b; }
.rc-stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; color: var(--rc-navy); }
.rc-stat-label { font-size: .78rem; color: var(--rc-muted); margin-top: 2px; }

/* ── Admin table ─────────────────────────────────────────────────── */
.rc-admin-card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: .85rem 1.25rem;
}
.rc-admin-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid rgba(0,0,0,.06);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rc-muted);
    padding-top: .75rem;
    padding-bottom: .75rem;
}
.rc-admin-table tbody tr { transition: background .12s; }
.rc-admin-table tbody td { border-color: rgba(0,0,0,.04); font-size: .88rem; }
.rc-row-escalated { background: #fff5f5 !important; }
.rc-row-escalated:hover { background: #fee2e2 !important; }

/* ── Alert for escalated ─────────────────────────────────────────── */
.rc-admin-alert-escalated {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444 !important;
    border-radius: 8px;
}

/* ── Admin nav brand highlight (legacy) ───────────────────────────── */
.rc-admin-nav-brand-highlight { color: var(--rc-pink); }

/* ── Admin chat log ──────────────────────────────────────────────── */
.rc-chat-log {
    max-height: 70vh;
    overflow-y: auto;
}
.rc-msg {
    max-width: 80%;
    font-size: .9rem;
}
.rc-msg-meta {
    font-size: .7rem;
    opacity: .5;
}
.rc-msg-user-bubble {
    background: var(--rc-pink);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.rc-msg-assistant-bubble {
    background: #f1f5f9;
    color: var(--rc-text);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--rc-border);
}
.rc-msg-escalated { outline: 2px solid #dc3545; }
.rc-chat-link { color: var(--rc-pink-dark); font-weight: 500; text-decoration: underline; }
.rc-chat-link:hover { color: var(--rc-pink-darker); }

/* ── OAuth / Google login icon ───────────────────────────────────── */
.rc-oauth-icon { vertical-align: middle; margin-right: .5rem; }

/* ── OAuth login button ─────────────────────────────────────────── */
.rc-oauth-btn { padding: .65rem; font-weight: 500; }

/* ── Navy text utility ───────────────────────────────────────────── */
.rc-navy-text { color: var(--rc-navy); }
