/* Header Styles - HubTweak */

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

.dropdown-item.has-submenu {
    position: relative;
    cursor: pointer;
}

.dropdown-item.has-submenu .submenu-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-item.has-submenu:hover .submenu-arrow {
    transform: translateX(3px);
}

.submenu {
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown-item.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-item:hover {
    background-color: #f8f9fa;
    color: var(--accent-color);
}

.submenu-item i {
    width: 16px;
    text-align: center;
    color: var(--accent-color);
}

.submenu-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile Responsive Submenu */
@media (max-width: 768px) {
    .submenu {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--accent-color);
        margin-left: 20px;
        margin-top: 10px;
        margin-bottom: 10px;
        min-width: auto;
        background: transparent;
    }

    .dropdown-item.has-submenu:hover .submenu {
        transform: none;
    }

    .submenu-item {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .dropdown-item.has-submenu .submenu-arrow {
        transform: rotate(90deg);
        transition: transform 0.3s ease;
    }

    .dropdown-item.has-submenu:hover .submenu-arrow {
        transform: rotate(90deg) translateX(3px);
    }
}

/* Combined Feed Control Styling */
.combined-feed-control {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 8px !important;
}

.combined-feed-control i {
    font-size: 16px;
    color: #333;
}

.combined-feed-control:hover i {
    color: var(--accent-color, #4A0404);
}

/* Combined Control Popup */
.combined-control-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    min-width: 180px;
    max-width: 200px;
    padding: 10px 0;
}

.combined-feed-control.active .combined-control-popup,
.combined-feed-control:focus .combined-control-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Control Section */
.control-section {
    padding: 0 10px;
}

.control-section:first-child {
    padding-top: 0;
}

.control-section:last-child {
    padding-bottom: 0;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 6px;
}

.section-header i {
    font-size: 0.75rem;
    color: var(--accent-color, #4A0404);
}

.section-header>span:first-of-type {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-selected {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent-color, #4A0404);
    text-transform: none;
    letter-spacing: 0;
    margin-left: auto;
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

/* Section Items */
.section-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Popup Item */
.popup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    position: relative;
}

.popup-item:hover {
    background: #f8f9fa;
}

.popup-item.active {
    background: #e3f2fd;
    color: #1976d2;
}

.popup-item i:first-of-type {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: #495057;
}

.popup-item.active i:first-of-type {
    color: #1976d2;
}

.popup-text {
    flex: 1;
    font-size: 0.8rem;
    color: #212529;
}

.popup-item.active .popup-text {
    color: #1976d2;
    font-weight: 500;
}

/* Selected Indicator */
.selected-indicator {
    width: 5px;
    height: 5px;
    font-size: 0.4rem;
    color: #1976d2;
    margin-left: auto;
}

.popup-item.active .selected-indicator {
    display: block !important;
}

/* Legacy Feed Control Styles (kept for backward compatibility) */
.feed-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.feed-control:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.feed-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.control-label {
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

/* Dropdown Styling */
.feed-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 160px;
    margin-top: 4px;
}

.feed-control:hover .feed-dropdown,
.feed-control:focus .feed-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.active {
    background: #e3f2fd;
    color: #1976d2;
}

.header .logo-img {
    height: 30px;
    width: auto;
    vertical-align: middle;
    border-radius: 4px !important;
}

.dropdown-icon {
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

.dropdown-text {
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    flex: 1;
}

/* User Dropdown Styling */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    /* Push to right side */
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 4px 12px;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-dropdown-toggle:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-dropdown-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 240px;
    margin-top: 8px;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-user-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dropdown-user-email {
    color: #666;
    font-size: 12px;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.user-dropdown-menu .dropdown-item:hover {
    background: #f8f9fa;
    color: #333;
}

.user-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    color: #666;
}

.dropdown-item-danger {
    color: #dc3545 !important;
}

.dropdown-item-danger:hover {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.dropdown-item-danger i {
    color: #dc3545 !important;
}

/* Guest auth CTA */
.guest-auth-cta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guest-login-link,
.guest-signup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.guest-login-link {
    color: #ffffff;
    background: var(--primary-color);
}

.guest-login-link:hover {
    background: #e61e1e;
}

.guest-signup-link {
    color: #fff;
    background: var(--accent-color);
}

.guest-signup-link:hover {
    background: #333333;
}

/* Header Icons Styling */
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 0;
}

.header-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 15%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-icon-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-icon-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.header-icon-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.header-icon-btn.disabled:hover {
    background: white;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-badge,
.message-badge,
.stories-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
    display: block;
}

/* Compact header adjustments */
.compact-feed-controls .feed-control {
    padding: 6px 10px;
    min-width: 70px;
}

.compact-feed-controls .control-label {
    font-size: 0.8em;
}

.compact-feed-controls .feed-dropdown {
    min-width: 140px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .feed-controls {
        gap: 10px;
    }

    .feed-control {
        padding: 6px 8px;
        min-width: 60px;
    }

    .control-label {
        font-size: 0.8em;
    }

    .feed-dropdown {
        min-width: 120px;
    }

    .dropdown-item {
        padding: 8px 10px;
    }

    .dropdown-text {
        font-size: 0.8em;
    }

    /* Header icons mobile adjustments */
    .header-icons {
        gap: 10px;
        margin-left: 15px;
    }
    
    .header-icon-secondary {
        display: none;
    }

    .header-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .guest-auth-cta {
        gap: 8px;
    }

    .guest-login-link,
    .guest-signup-link {
        height: 32px;
        padding: 0 10px;
        font-size: 0.8rem;
    }

    /* User dropdown mobile adjustments */
    .user-dropdown-toggle {
        padding: 6px 12px;
    }

    .user-name {
        display: none;
        /* Hide name on mobile to save space */
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .user-dropdown-menu {
        right: -10px;
        min-width: 200px;
    }

    .dropdown-header {
        padding: 12px;
    }

    .dropdown-avatar {
        width: 40px;
        height: 40px;
    }

    .user-dropdown-menu .dropdown-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .header-icon-secondary {
        display: none;
    }
}

/* Coming Soon Badge Styling */
.coming-soon-badge {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.dropdown-item.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.dropdown-item.coming-soon:hover {
    background-color: transparent;
    transform: none;
}

.submenu-item.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.submenu-item.coming-soon:hover {
    background-color: transparent;
    transform: none;
}

/* Mobile responsive adjustments for coming soon badges */
@media (max-width: 768px) {
    .coming-soon-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}
