/* Extracted navbar, search and mobile header styles from includes/header.php */
.navbar {
    font-family: 'Inter', 'Mona Sans', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 24px;
    background: #fff;
    position: relative;
    z-index: 1000;
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-img {
    height: 30px;
    width: auto;
    display: block;
}

.nav-link {
    text-decoration: none;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    color: #ffa31a;
}

.pill {
    background-color: #ffa31a;
    border-radius: 999px;
    padding: 6px 16px; /* use padding instead of fixed height to center vertically */
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: #000;
    display: inline-flex;
    align-items: center;
    line-height: 1; /* prevent uneven vertical alignment */
    letter-spacing: 0.3px;
    align-self: center;
}

@media (max-width: 768px) {
    /* Slight padding adjustment for smaller viewports */
    .pill { padding: 6px 14px; }
}

.pill:hover { background-color: #e8940f; }

.auth-link { font-size: 14px; font-weight: 600; text-decoration: none; color: #000; letter-spacing: 0.3px; }

.login-btn {
    background: #000;
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center;
    height: 28px;
    letter-spacing: 0.3px;
}

.login-btn:hover { background: #333; }

.profile-dropdown-container { position: relative; display: inline-block; cursor: pointer; z-index: 100; }
.profile-pic { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid transparent; transition: border-color 0.2s ease-in-out; }
.profile-pic:hover { border-color: #ffa31a; }

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    right: 0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
}

.dropdown-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-menu a:hover { background-color: #ffa31a; color: black; }
.dropdown-menu a i { width: 16px; text-align: center; }
.profile-dropdown-container.active .dropdown-menu { display: block; }

@media (max-width: 767px) {
    .search-modal-popup .close-button { right: 20px; top: 10px; background: #007bff; font-size: 24px; padding: 2px 8px; }
}

/* Hamburger menu for mobile */
.hamburger { display: none; font-size: 24px; cursor: pointer; color: #ffffff; order: 2; }

/* Mobile Settings Dropdown (New) */
.mobile-settings-container { position: relative; display: none; width: 100%; text-align: center; margin-top: 10px; }
.mobile-settings-trigger { background-color: #292929; color: #ffffff; padding: 12px 15px; border: none; border-radius: 8px; width: 100%; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: background-color 0.2s ease; }
.mobile-settings-trigger:hover { background-color: #3a3a3a; }
.mobile-dropdown-menu { display: none; position: static; background-color: #292929; width: 100%; box-shadow: none; border-top: 1px solid #3a3a3a; border-radius: 0; overflow: hidden; }
.mobile-dropdown-menu.active { display: flex; flex-direction: column; }
.mobile-dropdown-menu a { padding: 10px 20px; text-align: center; width: 100%; border-bottom: 1px solid #3a3a3a; justify-content: center; color: #ffffff; font-size: 14px; font-weight: 500; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.mobile-dropdown-menu a:last-child { border-bottom: none; }
.mobile-dropdown-menu a:hover { background-color: #3a3a3a; color: #ffa31a; }
.mobile-logout-link { background-color: #000; color: #fff; margin-top: 10px; border-radius: 8px; padding: 10px 20px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; text-decoration: none; }
.mobile-logout-link:hover { background-color: #333; }

/* Search Icon */
.search-icon-container { cursor: pointer; font-size: 20px; color: #ffffff; margin-right: 10px; display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; transition: all 0.3s ease; background: transparent; }
.search-icon-container:hover { background: rgba(143, 223, 255, 0.1); color: #ffa31a; transform: scale(1.05); }
.search-icon-container:active { transform: scale(0.95); }

/* Hide search icon when search bar is active */
.expandable-search-container.active + .search-icon-container { opacity: 0; pointer-events: none; transform: scale(0.8); }

/* Expandable Search Bar Styles */
.expandable-search-container { position: relative; display: flex; align-items: center; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; max-width: 0; opacity: 0; margin-right: 0; border-radius: 50px; background: #292929; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.expandable-search-container.active { max-width: 500px; opacity: 1; margin-right: 15px; padding: 4px; animation: searchExpand 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes searchExpand { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.expandable-search-input { width: 100%; padding: 12px 20px; border: none; border-radius: 50px; font-size: 16px; background: transparent; color: #ffffff; outline: none; transition: all 0.3s ease; padding-right: 80px; }
.expandable-search-input::placeholder { color: #808080; font-weight: 400; }
.expandable-search-input:focus { background: #1b1b1b; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
.expandable-search-button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; background: #ffa31a; border: none; border-radius: 50%; cursor: pointer; color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(143, 223, 255, 0.3); }
.expandable-search-button:hover { background: #e8940f; transform: translateY(-50%) scale(1.05); box-shadow: 0 4px 12px rgba(143, 223, 255, 0.4); }
.expandable-search-button:active { transform: translateY(-50%) scale(0.95); }
.search-close-btn { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #999; cursor: pointer; font-size: 18px; padding: 8px; border-radius: 50%; transition: all 0.2s ease; opacity: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
.expandable-search-container.active .search-close-btn { opacity: 1; pointer-events: all; }
.search-close-btn:hover { background: rgba(0, 0, 0, 0.1); color: #666; }

/* Responsive adjustments for search close button */
@media (max-width: 1200px) { .search-close-btn { right: 58px; font-size: 17px; padding: 7px; width: 30px; height: 30px; min-width: 30px; min-height: 30px; } }
@media (max-width: 1024px) { .search-close-btn { right: 56px; font-size: 16px; padding: 6px; width: 28px; height: 28px; min-width: 28px; min-height: 28px; } }
@media (max-width: 768px) { .search-close-btn { right: 52px; font-size: 15px; padding: 5px; width: 26px; height: 26px; min-width: 26px; min-height: 26px; } }
@media (max-width: 576px) { .search-close-btn { right: 48px; font-size: 14px; padding: 4px; width: 24px; height: 24px; min-width: 24px; min-height: 24px; } }
@media (max-width: 480px) { .search-close-btn { right: 44px; font-size: 13px; padding: 3px; width: 22px; height: 22px; min-width: 22px; min-height: 22px; } }
@media (max-width: 360px) { .search-close-btn { right: 40px; font-size: 12px; padding: 2px; width: 20px; height: 20px; min-width: 20px; min-height: 20px; } }

/* Mobile responsive adjustments */
@media (max-width: 1024px) { .expandable-search-container.active { max-width: 400px; } }
@media (max-width: 768px) { .expandable-search-container.active { max-width: 280px; margin-right: 10px; } .expandable-search-input { font-size: 15px; padding: 10px 18px; padding-right: 70px; } .expandable-search-button { width: 40px; height: 40px; font-size: 14px; } .search-close-btn { right: 55px; font-size: 16px; padding: 6px; } }
@media (max-width: 576px) { .expandable-search-container.active { max-width: 220px; margin-right: 8px; } .expandable-search-input { font-size: 14px; padding: 8px 16px; padding-right: 65px; } .expandable-search-button { width: 36px; height: 36px; font-size: 13px; } .search-close-btn { right: 50px; font-size: 15px; padding: 5px; } }
@media (max-width: 480px) { .expandable-search-container.active { max-width: 180px; } .expandable-search-input { font-size: 13px; padding: 6px 14px; padding-right: 60px; } .expandable-search-button { width: 32px; height: 32px; font-size: 12px; } .search-close-btn { right: 45px; font-size: 14px; padding: 4px; } }

/* Ensure search icon is properly positioned on mobile */
@media (max-width: 768px) { .search-icon-container { order: 1; margin-left: auto; margin-right: 0; } .expandable-search-container { order: 2; } }

/* Remove old search modal styles */
.search-modal-overlay, .search-modal-popup, .search-form-wrapper, .form-container, #popup-search-form, .search-container, #popup-search-input, #popup-search-button { display: none !important; }

/* Utility classes for responsive display */
.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; justify-content: space-between; padding: 10px 20px; }
    .navbar-left { order: 1; gap: 10px; }
    .navbar-right { display: none; order: 3; flex-direction: column; width: 100%; gap: 10px; padding-top: 10px; }
    .navbar-right.active { display: flex; }
    .desktop-only { display: none !important; }
    .mobile-only { display: flex; }
    .hamburger { display: block; }
    .profile-dropdown-container { display: none; }
    .mobile-settings-container { display: block; }
    .auth-link, .login-btn { width: 100%; text-align: center; padding: 10px 0; justify-content: center; }
    .search-icon-container { display: flex; order: 1; margin-right: 0; margin-left: auto; }
}
