/* assets/css/public-layout.css - Styles shared by every public page (reset, theme, navbar, sidebar,
   buttons, footer, floating buttons, AI chat). Page styles: assets/css/pages/<page>.css */

/* ----- RESET & BASE ----- */

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

/* ----- LOGO (brandLogo() in includes/functions.php) ----- */

.brand-mark {
    width: 36px;
    height: 36px;
    flex: none;
}

.brand-mark-dark,
body.dark .brand-mark-light {
    display: none;
}

body.dark .brand-mark-dark {
    display: block;
}

.brand-word {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: #0f172a;
}

.brand-word span {
    color: #0d6efd;
}

body.dark .brand-word {
    color: #fff;
}

body.dark .brand-word span {
    color: #4d8dff;
}

/* Elements hidden with the hidden attribute stay hidden even when a page rule sets display */
[hidden] {
    display: none !important;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f6f9fc;
    color: #0b1e33;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ----- DARK THEME (via .dark) ----- */

body.dark {
    background: #0f172a;
    color: #eef2f6;
}

body.dark .bg-soft-primary {
    background: #1e2a3e !important;
}

body.dark .text-secondary {
    color: #94a3b8 !important;
}

body.dark .section-title {
    color: #f1f5f9;
}

body.dark .section-sub {
    color: #94a3b8;
}

body.dark .stat-number {
    color: #f1f5f9;
}

body.dark .badge-method {
    background: #2d3a52;
    color: #b9d0ff;
}

body.dark .btn-outline {
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .btn-outline:hover {
    background: #2d3a52;
}

body.dark .trust-badges span {
    background: #1e293b;
    border-color: #334155;
}

body.dark .sidebar .close-btn {
    color: #e2e8f0;
}

body.dark .sidebar a:hover {
    background: #2d3a52;
}

body.dark .who-icon {
    background: #2d3a52;
    color: #7aa9ff;
}

body.dark .floating-btn {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

body.dark .floating-btn:hover {
    background: #2d3a52 !important;
}

body.dark .phone-popup {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark .phone-popup .phone-item {
    color: #e2e8f0 !important;
}

body.dark .phone-popup .phone-item:hover {
    background: #2d3a52 !important;
}

body.dark .ai-chat-widget {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark .ai-chat-header {
    background: #0f172a !important;
    border-color: #334155 !important;
}

body.dark .ai-chat-messages .message.bot {
    background: #2d3a52 !important;
    color: #e2e8f0 !important;
}

body.dark .ai-chat-messages .message.user {
    background: #0d6efd !important;
    color: #fff !important;
}

body.dark .ai-chat-input input {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark .ai-chat-input button {
    background: #0d6efd !important;
}

body.dark .ai-chat-input button:hover {
    background: #0b5ed7 !important;
}

body.dark .ai-chat-toggle {
    background: #0d6efd !important;
}

/* ----- BUTTONS ----- */

.btn {
    display: inline-block;
    padding: 0.6rem 2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.btn-primary {
    background: #0d6efd;
    color: #fff;
}

.btn-primary:hover {
    background: #0b5ed7;
    transform: scale(1.02);
    box-shadow: 0 8px 20px -8px #0d6efd66;
}

.btn-outline {
    background: transparent;
    border: 2px solid #dde3ed;
    color: #1e2f44;
}

.btn-outline:hover {
    background: #f0f5fe;
    border-color: #0d6efd;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    background: #fff;
    border-bottom: 1px solid rgba(13, 110, 253, 0.08);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: background 0.3s;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}


.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: #4a5c72;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #0d6efd;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-actions .btn {
    font-size: 0.9rem;
    padding: 0.4rem 1.2rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #0b1e33;
}

body.dark .nav-toggle {
    color: #eef2f6;
}

/* Dark theme: top bar, menu links and mobile sidebar (shared by every page) */
body.dark .navbar,
body.dark .sidebar,
body.dark .footer {
    background: #1e293b;
    border-color: #334155;
}

body.dark .navbar {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

body.dark .nav-links a,
body.dark .sidebar-nav a {
    color: #cbd5e1;
}

body.dark .nav-links a:hover,
body.dark .nav-links a.active {
    color: #7aa9ff;
}

body.dark .sidebar-nav a:hover,
body.dark .sidebar-nav a.active {
    background: #2d3a52;
    color: #fff;
}

body.dark .sidebar-nav a i {
    color: #7aa9ff;
}

body.dark .sidebar-nav a.auth-link {
    border-top-color: #334155;
}

/* Phones: the links move into the sidebar (menu button) */
@media (max-width: 768px) {
    .nav-links,
    .nav-actions .btn {
        display: none;
    }
    .nav-toggle {
        display: block;
    }
    .nav-actions {
        margin-left: auto;
    }
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    padding: 30px 24px 24px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(13, 110, 253, 0.06);
}

.sidebar.open {
    left: 0;
}

.sidebar .close-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    align-self: flex-end;
    color: #0b1e33;
    padding: 4px 8px;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}


.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav a {
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    color: #4a5c72;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-nav a i {
    width: 22px;
    text-align: center;
    color: #0d6efd;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #edf4fe;
    color: #0d6efd;
}

.sidebar-nav a.auth-link {
    border-top: 1px solid rgba(13, 110, 253, 0.08);
    margin-top: 4px;
    padding-top: 14px;
}

/* ============================================================
   FLOATING ACTION BUTTONS
   ============================================================ */

.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.floating-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.10);
    color: #0b1e33;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.floating-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.floating-btn .tooltip {
    position: absolute;
    right: 60px;
    background: #0b1e33;
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.floating-btn:hover .tooltip {
    opacity: 1;
}

body.dark .floating-btn .tooltip {
    background: #e2e8f0;
    color: #0b1e33;
}

.floating-btn .badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============================================================
   PHONE POPUP - Opens to the LEFT
   ============================================================ */

.phone-popup {
    position: absolute;
    bottom: 0;
    right: 60px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
    min-width: 200px;
    border: 1px solid #eef3f9;
    display: none;
    flex-direction: column;
}

.phone-popup.open {
    display: flex;
}

.phone-popup .phone-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #0b1e33;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.phone-popup .phone-item:hover {
    background: #f1f5f9;
}

.phone-popup .phone-item i {
    width: 20px;
    color: #0d6efd;
}

.phone-popup .phone-item .copy-icon {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.8rem;
}

.phone-popup .phone-item .copy-icon:hover {
    color: #0d6efd;
}

.phone-popup .divider {
    height: 1px;
    background: #eef3f9;
    margin: 4px 0;
}

/* ============================================================
   LANGUAGE DROPDOWN - Opens to the LEFT
   ============================================================ */

.lang-popup {
    position: absolute;
    bottom: 0;
    right: 60px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 140px;
    border: 1px solid #eef3f9;
    display: none;
    flex-direction: column;
}

.lang-popup.open {
    display: flex;
}

.lang-popup .lang-item {
    padding: 10px 20px;
    font-size: 0.85rem;
    color: #0b1e33;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-popup .lang-item:hover {
    background: #f1f5f9;
}

.lang-popup .lang-item .check {
    margin-left: auto;
    color: #0d6efd;
}

/* ============================================================
   SCROLL TOP BUTTON
   ============================================================ */

.scroll-top-btn {
    display: none;
}

/* The "more" button exists for phones only */
.floating-more {
    display: none;
}

/* Phones: smaller buttons closer to the edge; download, theme, language and phone behind "more" */
@media (max-width: 576px) {
    .floating-actions {
        right: 14px;
        bottom: 16px;
        gap: 8px;
    }

    .floating-btn,
    .ai-chat-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
    }

    .floating-more {
        display: flex;
    }

    .floating-actions .floating-extra {
        display: none;
    }

    .floating-actions.expanded .floating-extra {
        display: flex;
    }

    /* no hover labels on touch screens */
    .floating-btn .tooltip,
    .ai-chat-toggle .tooltip {
        display: none;
    }
}

.scroll-top-btn.visible {
    display: flex;
}

/* ============================================================
   AI CHAT WIDGET - Opens to the LEFT - FIXED HEIGHT
   ============================================================ */

.ai-chat-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ai-chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(13, 110, 253, 0.5);
}

.ai-chat-toggle .badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.ai-chat-toggle .tooltip {
    position: absolute;
    right: 60px;
    background: #0b1e33;
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.ai-chat-toggle:hover .tooltip {
    opacity: 1;
}

body.dark .ai-chat-toggle .tooltip {
    background: #e2e8f0;
    color: #0b1e33;
}

/* Chat widget - fixed height with proper scrolling */

.ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 100px;
    z-index: 998;
    width: 380px;
    height: 500px;
    max-height: 80vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid #eef3f9;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chat-widget.open {
    display: flex;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.ai-chat-header {
    padding: 14px 18px;
    background: #f8faff;
    border-bottom: 1px solid #eef3f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 60px;
}

.ai-chat-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-header .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.ai-chat-header .header-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.ai-chat-header .header-info p {
    font-size: 0.65rem;
    color: #22c55e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-chat-header .header-info p .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ai-chat-header .close-chat {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.ai-chat-header .close-chat:hover {
    background: #f1f5f9;
}

.ai-chat-header .header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ai-chat-header #newChat {
    font-size: 0.95rem;
}

.ai-chat-messages {
    flex: 1;
    padding: 14px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.ai-chat-messages .message {
    max-width: 85%;
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.ai-chat-messages .message.bot {
    align-self: flex-start;
    background: #f1f5f9;
    border-bottom-left-radius: 4px;
    color: #0b1e33;
}

.ai-chat-messages .message.user {
    align-self: flex-end;
    background: #0d6efd;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-chat-messages .message .time {
    font-size: 0.55rem;
    opacity: 0.6;
    margin-top: 3px;
    display: block;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 14px 8px;
    flex-shrink: 0;
}

.quick-replies button {
    padding: 4px 10px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    background: #f8faff;
    font-size: 0.7rem;
    color: #0b1e33;
    cursor: pointer;
    transition: all 0.15s;
}

.quick-replies button:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

body.dark .quick-replies button {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark .quick-replies button:hover {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.ai-chat-input {
    padding: 10px 14px 14px;
    border-top: 1px solid #eef3f9;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
}

.ai-chat-input input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    font-size: 0.85rem;
    outline: none;
    transition: border 0.2s;
    background: #f8faff;
    min-height: 38px;
}

.ai-chat-input input:focus {
    border-color: #0d6efd;
}

.ai-chat-input input::placeholder {
    color: #94a3b8;
}

.ai-chat-input button {
    padding: 8px 16px;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    min-height: 38px;
}

.ai-chat-input button:hover {
    background: #0b5ed7;
}

.ai-chat-input button i {
    font-size: 0.8rem;
}

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

.footer {
    background: #fff;
    border-top: 1px solid rgba(13, 110, 253, 0.08);
    padding: 50px 0 24px;
    transition: background 0.3s, border-color 0.3s;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand h6 {
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-brand h6.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-brand .brand-mark {
    width: 30px;
    height: 30px;
}

.footer-brand .brand-word {
    font-size: 1.35rem;
}

.footer-brand p {
    color: #4a5c72;
    font-size: 0.9rem;
    margin: 8px 0 16px;
    max-width: 320px;
}

body.dark .footer-brand p {
    color: #94a3b8;
}

.footer .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Round icon buttons */
.footer .social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
    color: #4a5c72;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.footer .social-links a:hover {
    background: #0d6efd;
    color: #fff;
    transform: translateY(-2px);
}

body.dark .footer .social-links a {
    background: rgba(255, 255, 255, 0.08);
    color: #9fb0c6;
}

body.dark .footer .social-links a:hover {
    background: #0d6efd;
    color: #fff;
}

.footer-col h6 {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 14px;
    color: #0b1e33;
}

body.dark .footer-col h6 {
    color: #eef2f6;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: #4a5c72;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: #0d6efd;
}

body.dark .footer-col ul a {
    color: #9fb0c6;
}

body.dark .footer-col ul a:hover {
    color: #4d8dff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(13, 110, 253, 0.06);
    color: #4a5c72;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: #0d6efd;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

body.dark .footer-bottom {
    color: #9fb0c6;
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark .footer-bottom a {
    color: #4d8dff;
}

/* Keep "Powered by" clear of the floating buttons (fixed on the right, 30px + 52px wide) */
@media (min-width: 577px) {
    .footer-bottom {
        padding-right: 80px;
    }
}

/* Phones: copyright and "Powered by" stacked and centred */
@media (max-width: 576px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Chat assistant: "..." while the answer is on its way, links inside answers */
.ai-chat-messages .message.typing {
    opacity: 0.6;
    font-style: italic;
}

.ai-chat-messages .message a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.ai-chat-messages .message.bot {
    white-space: pre-line;
}

.ai-chat-messages .chat-feedback {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.75;
    white-space: normal;
}

.ai-chat-messages .chat-feedback button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 2px 4px;
    font-size: 0.85rem;
}

.ai-chat-messages .chat-feedback button:hover {
    color: #0d6efd;
}

/* "Show doctors near me" (includes/nearby.php, assets/js/nearby.js): my-doctor.php and doctors-map.php */
.nearby-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.nearby-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.nearby-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 40px;
    border: 1px solid rgba(13, 110, 253, 0.3);
    background: #eaf2ff;
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
}

.nearby-button:hover { background: #dbe8ff; }
.nearby-button:disabled { opacity: 0.6; cursor: wait; }
.nearby-status { font-size: 0.88rem; color: #4a5c72; }
.nearby-status.is-error { color: #b91c1c; }

.nearby-reset {
    background: none;
    border: none;
    color: #0d6efd;
    font-size: 0.88rem;
    text-decoration: underline;
    cursor: pointer;
}

.nearby-reset[hidden] { display: none; }

.nearby-map-link {
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}

.nearby-map-link:hover { text-decoration: underline; }

.doctor-distance {
    color: #047857;
    font-weight: 600;
    font-size: 0.88rem;
    margin: 6px 0;
}

.doctor-distance[hidden] { display: none; }

body.dark .nearby-button { background: #0f2a4f; border-color: #1e4b8f; color: #93c5fd; }
body.dark .nearby-status { color: #94a3b8; }
body.dark .doctor-distance { color: #6ee7b7; }

/* "Verified visit" next to a review written after a real visit (verifiedVisitBadge()) */
.verified-visit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}

body.dark .verified-visit { background: #064e3b; color: #a7f3d0; }

/* a hint under a form field (feedback.php) */
.feedback-form-card .form-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 6px;
}

.feedback-form-card .form-hint a { color: #0d6efd; font-weight: 600; }
.feedback-form-card .form-hint i { color: #0d6efd; margin-right: 4px; }

/* While the next page loads (assets/js/public-layout.js): a bar at the top, the pressed button says "Please wait..." */
.site-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 3000; overflow: hidden; background: rgba(13, 110, 253, 0.15); }
.site-progress[hidden] { display: none; }
.site-progress span { position: absolute; top: 0; bottom: 0; width: 35%; background: #0d6efd; animation: site-progress 1.1s ease-in-out infinite; }
@keyframes site-progress { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .site-progress span { animation: none; left: 0; width: 100%; opacity: 0.6; } }
button.is-busy { opacity: 0.75; cursor: progress; }

/* No internet connection */
.site-net { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 3000; width: max-content; max-width: calc(100vw - 2rem);
    padding: 0.7rem 1rem; border-radius: 0.75rem; background: #b91c1c; color: #fff; font-size: 0.9rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25); }
.site-net[hidden] { display: none; }
.site-net.is-online { background: #15803d; }
