/* Site chrome: navbar, footer, button hovers, mobile nav, font-size preference.
   Extracted from the base.html inline <style> block (A1 of the UI overhaul) so
   the page chrome is cacheable and CSP can eventually drop 'unsafe-inline'. */

.navbar-brand {
    font-weight: 600;
    color: var(--bl-primary) !important;
}
.nav-link {
    color: var(--bl-text) !important;
}
.nav-link:hover {
    color: var(--bl-primary) !important;
}
.footer {
    background-color: var(--bl-surface-2);
    border-top: 1px solid var(--bl-border);
    margin-top: 50px;
    padding: 20px 0;
}
.daily-section {
    border-left: 4px solid var(--bl-primary);
    padding-left: 15px;
    margin-bottom: 20px;
}
/* .content-card is defined in style.css (single source of truth) */
.btn-primary {
    background-color: var(--bl-primary);
    border-color: var(--bl-primary);
}
.btn-primary:hover {
    background-color: var(--bl-primary-dark);
    border-color: var(--bl-primary-dark);
}

/* Global button system: subtle lift on hover, visible keyboard focus.
   (No brightness filter — it fights dark mode; solid hovers use their
   darker token instead.) */
.btn {
    transition: transform .18s ease, box-shadow .18s ease,
                background-color .18s ease, border-color .18s ease, color .18s ease;
    border-radius: var(--bl-radius-sm);
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.1);
}

.btn:focus-visible {
    outline: 2px solid var(--bl-primary-light);
    outline-offset: 2px;
}

/* Outline button hover effects - fill on hover */
.btn-outline-primary:hover {
    background-color: var(--bl-primary);
    border-color: var(--bl-primary);
    color: #fff;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
}

.btn-outline-success:hover {
    background-color: var(--bl-success);
    color: #fff;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

.btn-outline-warning:hover {
    background-color: var(--bl-warning);
    color: #000;
}

.btn-outline-info:hover {
    background-color: var(--bl-info);
    color: #000;
}

.btn-outline-light:hover {
    background-color: #fff;
    color: var(--bl-primary);
}

.btn-outline-dark:hover {
    background-color: #212529;
    color: #fff;
}

/* Light button (like "Start Your Daily Walk") hover effect */
.btn-light:hover {
    background-color: #e9ecef;
    border-color: #ddd;
    color: var(--bl-primary);
}

/* Large buttons get slightly more effect */
.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.2);
}

/* Prevent any floating dropdown menus */
body > .dropdown-menu,
body > .show,
.dropdown-menu.show[style*="position: absolute"],
.dropdown-menu.show[style*="position: fixed"] {
    display: none !important;
    visibility: hidden !important;
}

/* Mobile navigation fixes */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--bl-surface-2);
        border-radius: 0.375rem;
        margin-top: 0.5rem;
        padding: 1rem;
        width: 100%;
        position: relative;
        left: 0;
        right: 0;
        top: 0;
        z-index: 1000;
    }

    .navbar-nav {
        width: 100%;
        position: relative;
    }

    .navbar-nav .nav-item {
        width: 100%;
        position: relative;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--bl-border);
        display: block;
        width: 100%;
        position: relative;
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .dropdown-menu {
        border: none !important;
        box-shadow: none !important;
        background-color: var(--bl-surface-2) !important;
        margin-left: 1rem !important;
        position: static !important;
        float: none !important;
        width: auto !important;
        margin-top: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: auto !important;
    }

    .dropdown-menu.show {
        display: block !important;
        position: static !important;
    }

    /* Force containment within navbar */
    .navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        inset: auto !important;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
        position: relative;
    }

    .navbar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 0.5rem;
    }
}

/* Language selector mobile responsive */
@media (max-width: 767.98px) {
    .d-none.d-md-inline {
        display: inline !important;
    }
}

/* Dynamic Translation Styles */
.translating {
    transition: opacity 0.3s ease-in-out;
    opacity: 0.7;
}

#translation-loading {
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.translation-highlight {
    background-color: rgba(255, 193, 7, 0.2);
    transition: background-color 0.5s ease-out;
}

/* Smooth text transitions */
[data-original-text] {
    transition: opacity 0.2s ease-in-out;
}

/* Font Size Options */
body.font-size-small {
    font-size: 14px;
}
body.font-size-medium {
    font-size: 16px;
}
body.font-size-large {
    font-size: 18px;
}
body.font-size-very-large {
    font-size: 20px;
}
body.font-size-extra-large {
    font-size: 22px;
}

/* Scale headings proportionally */
body.font-size-small h1 { font-size: 1.8rem; }
body.font-size-small h2 { font-size: 1.5rem; }
body.font-size-small h3 { font-size: 1.3rem; }

body.font-size-large h1 { font-size: 2.2rem; }
body.font-size-large h2 { font-size: 1.8rem; }
body.font-size-large h3 { font-size: 1.5rem; }

body.font-size-very-large h1 { font-size: 2.4rem; }
body.font-size-very-large h2 { font-size: 2rem; }
body.font-size-very-large h3 { font-size: 1.7rem; }

body.font-size-extra-large h1 { font-size: 2.6rem; }
body.font-size-extra-large h2 { font-size: 2.2rem; }
body.font-size-extra-large h3 { font-size: 1.9rem; }

/* Font size selector styling */
.font-size-indicator {
    font-weight: 600;
    min-width: 20px;
    display: inline-block;
    text-align: center;
}
.font-size-small-icon { font-size: 12px; }
.font-size-medium-icon { font-size: 14px; }
.font-size-large-icon { font-size: 16px; }
.font-size-very-large-icon { font-size: 18px; }
.font-size-extra-large-icon { font-size: 20px; }
