/* d:\FAMO-PET\static\css\styles.css */

/* Navbar utilities */
.navbar-hidden {
    transform: translateY(-100%);
}

/* Responsive navbar padding */
@media (max-width: 1023px) {
    nav#main-navbar {
        padding: 1rem 0.5rem;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
}

/* Ensure hidden class works even if Tailwind fails */
.hidden {
    display: none !important;
}

/* Mobile menu should be visible when not hidden */
#mobile-menu {
    display: block;
}

#mobile-menu.hidden {
    display: none !important;
}

/* Desktop menu - ensure it shows on desktop even if Tailwind fails */
@media (min-width: 1024px) {
    #navbar-menu {
        display: flex !important;
        flex-grow: 1;
        align-items: center;
        justify-content: space-between;
    }
}

/* Mobile menu button - hide on desktop */
@media (min-width: 1024px) {
    #mobile-menu-button {
        display: none !important;
    }
}

.selectable-option {
    transition: border-color 0.2s, background 0.2s;
}
.selectable-option:hover {
    border-color: #60a5fa; /* Tailwind's blue-400 */
    background-color: hsl(214, 64%, 85%); /* Tailwind's blue-50 */
}

.selectable-option input[type="radio"]:checked + label {
    border-color: #2563eb; /* blue-600 */
    background-color: #dbeafe; /* blue-100 */
    display: none;
}

.markdown-content h1 {
    font-size: 2.25rem;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    font-weight: bold;
    color: #3730a3; /* indigo-800 */
}
.markdown-content h2 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    color: #4338ca; /* indigo-700 */
}
.markdown-content h3 {
    font-size: 1.25rem;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: bold;
    color: #6366f1; /* indigo-500 */
}
.markdown-content p {
    margin-bottom: 1.1em;
    line-height: 1.7;
}
.markdown-content ul, .markdown-content ol {
    margin-left: 2em;
    margin-bottom: 1em;
}
.markdown-content li {
    margin-bottom: 0.5em;
}
.markdown-content blockquote {
    border-left: 4px solid #a5b4fc;
    padding-left: 1em;
    color: #6b7280;
    margin: 1em 0;
    background: #f3f4f6;
}
.markdown-content code {
    background: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.3em;
    font-size: 0.95em;
}
.markdown-content pre {
    background: #f3f4f6;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    margin-bottom: 1.5em;
}
.markdown-content img {
    max-width: 100%;
    border-radius: 0.5em;
    margin: 1em 0;
}
.markdown-content a {
    color: #2563eb; /* Tailwind blue-600 */
    text-decoration: underline;
    transition: color 0.2s;
}
.markdown-content a:hover {
    color: #1d4ed8; /* Tailwind blue-700 */
    text-decoration: underline;
}

/* -------- Dashboard button visibility fixes -------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem; /* px-5 py-2.5 */
    border-radius: 0.75rem; /* rounded-xl */
    font-weight: 600;
    line-height: 1.25rem;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.08);
    -webkit-appearance: none;
    appearance: none;
}

.btn-elevated {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.btn-gradient-purple {
    background-image: linear-gradient(90deg, #7c3aed, #c026d3) !important;
    color: #fff !important;
}

.btn-gradient-emerald {
    background-image: linear-gradient(90deg, #059669, #0d9488) !important;
    color: #fff !important;
}

.btn i { pointer-events: none; }

/* Ensure sticky bar has solid background behind gradients */
.sticky-actions {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
}

/* ============================================= */
/* Navigation Menu Styles */
/* ============================================= */

/* Main Navigation Bar */
#main-navbar {
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 1);
    position: fixed;
    width: 100%;
    z-index: 50;
    transition: transform 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

/* Brand Logo */
.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.02);
}

.nav-brand img {
    height: 2.5rem;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-brand:hover img {
    transform: scale(1.05);
}

.nav-brand-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #374151;
    margin-left: 0.5rem;
    display: none;
}

@media (min-width: 640px) {
    .nav-brand-text {
        display: block;
    }
}

/* Desktop Navigation */
.nav-desktop {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 64rem;
    margin: 0 2rem;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: #4f46e5;
    background-color: #eef2ff;
}

.nav-link i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* Dropdown Containers */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #374151;
    background: none;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
}

.nav-dropdown-button:hover {
    color: #4f46e5;
    background-color: #eef2ff;
}

.nav-dropdown-button i.chevron {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .chevron {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    width: 12rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu .dropdown-content {
    padding: 0.5rem 0;
}

.nav-dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-dropdown-link:hover {
    background-color: #eef2ff;
    color: #4f46e5;
}

.nav-dropdown-link i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* Special Buttons */
.nav-chat-btn {
    background: linear-gradient(to right, #f97316, #ea580c);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    margin: 0 0.5rem;
}

.nav-chat-btn:hover {
    background: linear-gradient(to right, #ea580c, #dc2626);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
    color: white;
}

/* Right Side Actions */
.nav-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .nav-actions {
        display: flex;
    }
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #374151;
    background: none;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-dropdown-button:hover {
    color: #4f46e5;
    background-color: #f9fafb;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.user-name {
    font-weight: 500;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    width: 12rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}

.user-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.user-dropdown-divider {
    border-top: 1px solid #f3f4f6;
    margin: 0.25rem 0;
}

.logout-link:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Auth Buttons */
.auth-login {
    color: #6b7280;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: #f9fafb;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-login:hover {
    color: #4f46e5;
    background-color: #f3f4f6;
}

.auth-signup {
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.auth-signup:hover {
    background: linear-gradient(to right, #4338ca, #6d28d9);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
    color: white;
}

/* Language Switcher */
.lang-dropdown {
    position: relative;
}

.lang-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.875rem;
}

.lang-button:hover {
    color: #4f46e5;
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.lang-button i {
    margin-right: 0.5rem;
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    width: 8rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}

.lang-dropdown:hover .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    background: none;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lang-option:hover {
    background-color: #eef2ff;
    color: #4f46e5;
}

.lang-option.active {
    background-color: #eef2ff;
    color: #4f46e5;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    color: #6b7280;
    background: none;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 1.25rem;
}

@media (max-width: 1023px) {
    .mobile-menu-btn {
        display: block !important;
    }
    
    .nav-desktop {
        display: none !important;
    }
    
    .nav-actions {
        display: none !important;
    }
    
    .lang-dropdown {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .nav-desktop {
        display: flex !important;
    }
    
    .nav-actions {
        display: flex !important;
    }
}

.mobile-menu-btn:hover {
    color: #4f46e5;
    background-color: #f9fafb;
}

/* Mobile Menu */
.mobile-menu {
    background: white;
    border-top: 1px solid #e5e7eb;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px); /* 64px is navbar height */
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-menu.hidden {
    display: none !important;
}

.mobile-menu.show {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu:not(.hidden) {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-content {
    padding: 1rem;
    background: white;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    max-width: 1200px;
    margin: 0 auto;
}

/* Custom scrollbar for mobile menu */
.mobile-menu-content::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.mobile-menu-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.mobile-user-avatar {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 0.75rem;
    font-size: 0.875rem;
}

.mobile-user-details .user-name {
    font-weight: 500;
    color: #374151;
}

.mobile-user-details .user-email {
    font-size: 0.875rem;
    color: #6b7280;
}

.mobile-section {
    margin-bottom: 0.5rem;
}

.mobile-section-title {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.mobile-link {
    display: block;
    padding: 0.625rem 0.75rem;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    margin-bottom: 0.125rem;
}

.mobile-link:hover {
    background-color: #eef2ff;
    color: #4f46e5;
}

.mobile-link i {
    margin-right: 0.625rem;
    width: 1rem;
    text-align: center;
}

.mobile-chat-btn {
    display: block;
    background: linear-gradient(to right, #f97316, #ea580c);
    color: white;
    font-weight: 600;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
    text-decoration: none;
}

.mobile-divider {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.mobile-auth-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.mobile-auth-login {
    display: block;
    text-align: center;
    padding: 0.625rem 0.75rem;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.mobile-auth-login:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
}

.mobile-auth-signup {
    display: block;
    text-align: center;
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    color: white;
    font-weight: 600;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}