/* ============================================ */
/* Gold Theme Search Controls - Shared Styles */
/* ============================================ */

/* Main wrapper with gold gradient and glow */
.gold-controls-wrapper {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.08) 0%, rgba(241, 196, 15, 0.02) 100%);
    border: 1px solid rgba(241, 196, 15, 0.25);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 1rem;
    box-shadow: 
        0 0 20px rgba(241, 196, 15, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.gold-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Search Input with icon */
.gold-search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.gold-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(241, 196, 15, 0.6);
}

.gold-search {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--primary-text);
    font-size: 13px;
    transition: all 0.2s ease;
}

.gold-search:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.15);
}

.gold-search::placeholder {
    color: var(--muted-text);
}

/* Date/Period Toggle */
.gold-date-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.gold-toggle-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--secondary-text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gold-toggle-btn:hover:not(.active) {
    color: var(--primary-text);
    background: rgba(241, 196, 15, 0.1);
}

.gold-toggle-btn.active {
    background: linear-gradient(135deg, #f1c40f 0%, #d4a50a 100%);
    color: #000;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(241, 196, 15, 0.3);
}

/* Filter Buttons */
.gold-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--primary-text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gold-filter-btn:hover {
    border-color: rgba(241, 196, 15, 0.5);
    background: rgba(241, 196, 15, 0.1);
}

/* Select dropdown styled as gold filter */
.gold-select {
    padding: 10px 14px;
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--primary-text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 12 12' fill='%23f1c40f' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5H2.5Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.gold-select:hover {
    border-color: rgba(241, 196, 15, 0.5);
    background-color: rgba(241, 196, 15, 0.1);
}

.gold-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.15);
}

.gold-select option {
    background: var(--secondary-bg);
    color: var(--primary-text);
}

/* Count badge */
.gold-count {
    background: var(--accent-color);
    color: #000;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    display: none;
}

.gold-count.active {
    display: inline-block;
}

/* Notification Toggle Section */
.gold-notification {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding-left: 16px;
    border-left: 1px solid rgba(241, 196, 15, 0.3);
}

.gold-notif-label {
    font-size: 13px;
    color: var(--secondary-text);
}

.gold-notif-label .desktop-only {
    display: inline;
}

/* Toggle switch */
.gold-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.gold-toggle input { display: none; }

.gold-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 24px;
    transition: 0.3s;
}

.gold-slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.gold-toggle input:checked + .gold-slider {
    background: linear-gradient(135deg, #f1c40f 0%, #d4a50a 100%);
}

.gold-toggle input:checked + .gold-slider:before {
    transform: translateX(20px);
}

.gold-toggle.disabled-login,
.gold-toggle.disabled-premium {
    opacity: 0.5;
    cursor: not-allowed;
}

.gold-toggle.disabled-login .gold-slider,
.gold-toggle.disabled-premium .gold-slider {
    cursor: not-allowed;
}

/* Multi-Select Dropdown styling */
.gold-controls .multi-select-dropdown {
    position: relative;
    flex-shrink: 0;
}

.gold-controls .multi-select-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    margin-top: 4px;
    background: var(--secondary-bg);
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
    padding: 4px 0;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gold-controls .multi-select-dropdown.open .multi-select-menu {
    display: block;
}

.gold-controls .multi-select-menu label.filter-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: #ffffff !important;
    background: transparent !important;
    white-space: nowrap !important;
}

.gold-controls .multi-select-menu label.filter-option:hover {
    background: rgba(241, 196, 15, 0.1) !important;
}

.gold-controls .multi-select-menu label.filter-option > input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    accent-color: var(--accent-color) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* ============================================ */
/* Gold Separator */
/* ============================================ */

.gold-separator {
    width: 1px;
    height: 24px;
    background: rgba(241, 196, 15, 0.3);
    margin: 0 4px;
    flex-shrink: 0;
}

/* ============================================ */
/* Followed Companies Toggle */
/* ============================================ */

.gold-followed-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.gold-followed-toggle:hover {
    border-color: rgba(241, 196, 15, 0.4);
    background: rgba(241, 196, 15, 0.05);
}

.gold-followed-toggle.active {
    border-color: var(--accent-color);
    background: rgba(241, 196, 15, 0.15);
}

/* Checkbox input styling */
input.gold-followed-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

/* Disable pointer events on checkbox/label when in restricted state - let container handle clicks */
.gold-followed-toggle.login-required input.gold-followed-checkbox,
.gold-followed-toggle.login-required label,
.gold-followed-toggle.premium-required input.gold-followed-checkbox,
.gold-followed-toggle.premium-required label,
.gold-followed-toggle.no-companies input.gold-followed-checkbox,
.gold-followed-toggle.no-companies label {
    pointer-events: none;
}

input.gold-followed-checkbox:checked {
    accent-color: var(--accent-color);
}

/* When toggle has active state, style the checkbox container */
.gold-followed-toggle.active input.gold-followed-checkbox {
    accent-color: var(--accent-color);
}

/* Span-based checkbox (legacy support) */
span.gold-followed-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(241, 196, 15, 0.4);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gold-followed-toggle.active span.gold-followed-checkbox {
    background: linear-gradient(135deg, #f1c40f 0%, #d4a50a 100%);
    border-color: transparent;
}

span.gold-followed-checkbox svg {
    width: 12px;
    height: 12px;
    color: #000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gold-followed-toggle.active span.gold-followed-checkbox svg {
    opacity: 1;
}

.gold-followed-label {
    font-size: 13px;
    color: var(--primary-text);
    white-space: nowrap;
}

.gold-followed-count {
    font-size: 11px;
    color: var(--accent-color);
    background: rgba(241, 196, 15, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

/* Restricted states - login required, premium required, no companies */
.gold-followed-toggle.login-required,
.gold-followed-toggle.premium-required,
.gold-followed-toggle.no-companies {
    opacity: 0.6;
    cursor: pointer;
}

.gold-followed-toggle.login-required:hover,
.gold-followed-toggle.premium-required:hover,
.gold-followed-toggle.no-companies:hover {
    opacity: 0.8;
    border-color: rgba(241, 196, 15, 0.3);
    background: rgba(241, 196, 15, 0.05);
}

/* ============================================ */
/* Global Modal Styles - Glass + Gold Theme */
/* ============================================ */

.site-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.site-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.site-modal .modal-content {
    position: relative;
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid #f1c40f;
    border-bottom: 3px solid #f1c40f;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 0 40px rgba(241, 196, 15, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.site-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.site-modal .modal-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.site-modal h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.site-modal p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.site-modal .modal-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.75rem;
}

.site-modal .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-modal .modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.site-modal .modal-btn.primary {
    background: linear-gradient(135deg, #f1c40f 0%, #d4a50a 100%);
    color: #000;
}

.site-modal .modal-btn.primary:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #f1c40f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(241, 196, 15, 0.25);
}

.site-modal .modal-btn.primary.discord {
    background: #5865F2;
    color: #ffffff;
}

.site-modal .modal-btn.primary.discord:hover {
    background: #4752c4;
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.25);
}

.site-modal .modal-btn.primary svg {
    width: 20px;
    height: 20px;
}

.site-modal .modal-btn.secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-modal .modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.site-modal .modal-btn.tertiary {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
}

.site-modal .modal-btn.tertiary:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Long/scrollable modal variant */
.site-modal.modal-long .modal-content {
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
    padding: 2rem 2.5rem;
}

.site-modal.modal-long .modal-content::-webkit-scrollbar {
    width: 6px;
}

.site-modal.modal-long .modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.site-modal.modal-long .modal-content::-webkit-scrollbar-thumb {
    background: #f1c40f;
    border-radius: 3px;
}

.site-modal.modal-long .modal-content::-webkit-scrollbar-thumb:hover {
    background: #f4d03f;
}

/* Alias for backwards compatibility with followed-modal */
.followed-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.followed-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.followed-modal .modal-content {
    position: relative;
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid #f1c40f;
    border-bottom: 3px solid #f1c40f;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 0 40px rgba(241, 196, 15, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.followed-modal .modal-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.followed-modal h2 {
    margin: 0 0 0.75rem 0;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.followed-modal p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.followed-modal .modal-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.75rem;
}

.followed-modal .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.followed-modal .modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.followed-modal .modal-btn.primary {
    background: linear-gradient(135deg, #f1c40f 0%, #d4a50a 100%);
    color: #000;
}

.followed-modal .modal-btn.primary:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #f1c40f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(241, 196, 15, 0.25);
}

.followed-modal .modal-btn.primary.discord {
    background: #5865F2;
    color: #ffffff;
}

.followed-modal .modal-btn.primary.discord:hover {
    background: #4752c4;
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.25);
}

.followed-modal .modal-btn.primary.gold {
    background: linear-gradient(135deg, #f1c40f 0%, #d4a50a 100%);
    color: #000;
}

.followed-modal .modal-btn.primary.gold:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #f1c40f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(241, 196, 15, 0.25);
}

.followed-modal .modal-btn.secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.followed-modal .modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.followed-modal .modal-btn.tertiary {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
}

.followed-modal .modal-btn.tertiary:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Modal button SVG icons */
.followed-modal .modal-btn svg,
.site-modal .modal-btn svg {
    width: 20px;
    height: 20px;
}

/* Hidden rows when filter is active - Multiple selectors for different page structures */
.followed-hidden {
    display: none !important;
}

/* For table rows */
tr.followed-hidden {
    display: none !important;
}

/* For div-based rows (media, etc) */
div.followed-hidden {
    display: none !important;
}

/* No results message when all rows are hidden */
.followed-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--muted-text);
    font-style: italic;
    background: var(--tertiary-bg);
    border-radius: 8px;
    margin-top: 1rem;
}

/* Mobile responsive for gold controls */
@media (max-width: 768px) {
    .gold-controls-wrapper {
        padding: 12px 14px;
    }
    
    .gold-controls {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    /* Row 1: Search bar + Live indicator */
    .gold-search-container {
        flex: 1 1 auto;
        max-width: none;
        min-width: unset;
        order: 1;
    }
    
    .gold-controls .live-status-indicator,
    .gold-controls .live-login-prompt {
        order: 1;
        flex: 0 0 auto;
    }
    
    .gold-search {
        padding: 8px 10px 8px 36px;
        font-size: 12px;
    }
    
    .gold-search-icon {
        left: 10px;
        width: 14px;
        height: 14px;
    }
    
    /* Row 2: Date filter + Notification toggle */
    .gold-date-toggle {
        padding: 2px;
        order: 2;
        flex: 1 1 auto;
    }
    
    .gold-date-toggle .gold-toggle-btn {
        flex: 1;
        text-align: center;
    }
    
    .gold-toggle-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .gold-notification {
        order: 2;
        margin-left: 0;
        padding-left: 10px;
        border-left: 1px solid rgba(241, 196, 15, 0.3);
    }
    
    .gold-notif-label {
        font-size: 12px;
    }
    
    .gold-notif-label .desktop-only {
        display: none;
    }
    
    .gold-toggle {
        width: 40px;
        height: 22px;
    }
    
    .gold-slider:before {
        width: 16px;
        height: 16px;
    }
    
    .gold-toggle input:checked + .gold-slider:before {
        transform: translateX(18px);
    }
    
    /* Row 3: Value filter + Followed toggle */
    .gold-value-toggle {
        order: 3;
        flex: 1 1 auto;
    }
    
    .gold-followed-toggle {
        padding: 6px 10px;
        order: 4;
    }
    
    /* Filter buttons/selects on their own row */
    .gold-controls .multi-select-dropdown,
    .gold-select {
        order: 4;
        flex: 1;
    }
    
    .gold-filter-btn {
        padding: 8px 10px;
        font-size: 12px;
        width: 100%;
        justify-content: center;
    }
    
    .gold-select {
        padding: 8px 10px;
        font-size: 12px;
        width: 100%;
    }
    
    .gold-count {
        font-size: 10px;
        padding: 1px 5px;
    }
    
    .gold-followed-label {
        font-size: 12px;
    }
    
    .gold-followed-label .desktop-only {
        display: none;
    }
    
    .gold-followed-checkbox {
        width: 16px;
        height: 16px;
    }
    
    .gold-followed-checkbox svg {
        width: 10px;
        height: 10px;
    }
    
    .gold-followed-count {
        font-size: 10px;
        padding: 1px 5px;
    }
}
