/**
 * Luminie - Custom Header Base Styles
 * Responsive header handoff lives in layout-combined.css.
 */

:root {
    --primary-blue: #3B82F6;
    --primary-purple: #8B5CF6;
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --error-red: #EF4444;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --bg-light: #F8FAFC;
    --border-light: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
}

/* Search Button Styles */
.search-btn {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Search Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.search-form .input-group {
    border-radius: 8px;
    overflow: hidden;
}

.search-form .form-control {
    border: 2px solid var(--border-light);
    border-right: none;
    padding: 12px 16px;
    font-size: 16px;
}

.search-form .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.search-form .btn {
    border-radius: 0 8px 8px 0;
    padding: 12px 20px;
    font-weight: 500;
}

/* Quick Search Buttons */
.btn-outline-secondary {
    border-radius: 20px;
    font-size: 12px;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Fallback Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal.show {
    display: block !important;
}

.modal-open {
    overflow: hidden;
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    z-index: 9999 !important;
    position: absolute !important;
}

.dropdown {
    position: relative !important;
}

.notification-dropdown .dropdown-menu {
    z-index: 9999 !important;
}

.dropdown-item {
    padding: 12px 20px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.dropdown-header {
    padding: 15px 20px 10px;
    font-weight: 600;
    color: var(--primary-blue);
}

.dropdown-divider {
    margin: 0;
}

/* Admin Panel Link Styling */
.dropdown-item.text-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin: 4px 8px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.dropdown-item.text-primary:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.15));
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(5px) translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.dropdown-item.text-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.dropdown-item.text-primary:hover::before {
    left: 100%;
}

/* Mobile Navbar Admin Link */
.navbar-nav .nav-link.text-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin: 4px 0;
    padding: 8px 16px !important;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link.text-primary:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.15));
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.navbar-nav .nav-link.text-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.navbar-nav .nav-link.text-primary:hover::before {
    left: 100%;
}

/* Mobile responsive admin link */
@media (max-width: 991px) {
    .navbar-nav .nav-link.text-primary {
        margin: 8px 0;
        text-align: center;
        font-weight: 600;
    }
}

/* Dropdown show/hide animations */
.dropdown-menu {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

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

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

/* Buttons */
.btn-primary-custom {
    width: 150px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline-custom {
    width: 150px;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-custom:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* Mobile Back Button - Test with visible default */
.mobile-back-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(59, 130, 246, 0.9) !important;
    border: 2px solid #3b82f6 !important;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 9999 !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* Desktop - hide back button completely */
@media (min-width: 769px) {
    .mobile-back-btn {
        display: none !important;
    }
}
