/* Stocks Layout Styles */
.stocks-layout {
    padding: 20px;
    width: 45%;
    min-width: 940px;
    margin: 0 auto;
    position: relative;
    background: #1F1F1B;
}

.stocks-container {
    background: #121212;
    border-radius: 12px;
    overflow: hidden;
    padding: 0 20px;
}

/* Stocks Header */
.stocks-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Index Filter Buttons */
.index-filter-container {
    display: flex;
    gap: 8px;
}

.index-filter-btn {
    padding: 6px 14px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #888;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.index-filter-btn:hover {
    border-color: #555;
    color: #ccc;
}

.index-filter-btn.active {
    border-color: #caa999;
    background: #1a1a1a;
    color: #caa999;
}

.stocks-filter-btn {
    margin-left: auto;
}

.stocks-search-input {
    width: 250px;
    padding: 8px 16px;
    background: #333;
    border: 1px solid #444;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
}

.stocks-search-input:focus {
    outline: none;
    border-color: rgba(124, 195, 228, 0.5);
}

.stocks-title {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.stocks-filter-btn {
    padding: 8px 16px;
    background-color: rgba(0, 200, 200, 0.15);
    border: 1px solid rgba(124, 195, 228, 0.5);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7CC3E4;
}

.stocks-filter-btn:hover {
    background: #2a2a2a;
}

.stocks-filter-btn svg {
    flex-shrink: 0;
}

/* Stocks Filter Modal */
.stocks-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.filter-modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    width: 500px;
    height: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.filter-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.filter-modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-modal-close:hover {
    color: #fff;
}

.filter-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.filter-section h4 {
    margin: 0 0 16px 0;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.filter-accordion {
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 0;
}

.filter-accordion + .filter-accordion {
    margin-top: -1px;
    border-top: none;
}

.accordion-header {
    padding: 12px 16px;
    background: #222;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
    user-select: none;
}

.accordion-header:hover {
    background: #2a2a2a;
}

.accordion-arrow {
    color: #999;
    transition: transform 0.2s;
    font-size: 12px;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background: #1a1a1a;
}

.accordion-content.open {
    max-height: 300px;
}

.filter-options {
    padding: 12px 16px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    color: #ccc;
    font-size: 14px;
}

.filter-option:hover {
    color: #fff;
}

.filter-option input {
    margin-right: 10px;
    accent-color: #7CC3E4;
}

/* Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
}

.filter-chip {
    background: #333;
    border: 1px solid #444;
    border-radius: 16px;
    padding: 6px 12px;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.filter-chip:hover {
    background: #404040;
    color: #fff;
}

.filter-chip.selected {
    background: #7CC3E4;
    color: #000;
    border-color: #7CC3E4;
}

.filter-chip.see-all {
    background: #7CC3E4;
    color: #000;
    border-color: #7CC3E4;
    font-weight: 500;
}

.filter-chip.see-all:hover {
    background: #5aa3c7;
}

.filter-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-reset-btn {
    background: none;
    border: 1px solid #444;
    color: #999;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.filter-reset-btn:hover {
    color: #fff;
    border-color: #666;
}

.filter-close-btn {
    background: #7CC3E4;
    border: none;
    color: #000;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.filter-close-btn:hover {
    background: #5aa3c7;
}

/* Extended Selection View */
.filter-extended-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.filter-back-btn {
    background: none;
    border: none;
    color: #7CC3E4;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px 0 0;
    display: flex;
    align-items: center;
}

.filter-back-btn:hover {
    color: #5aa3c7;
}

.filter-search-section {
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.filter-search-input {
    width: 100%;
    padding: 10px 16px;
    background: #333;
    border: 1px solid #444;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.filter-search-input:focus {
    border-color: #7CC3E4;
}

.filter-search-input::placeholder {
    color: #999;
}

.filter-list-header {
    padding: 12px 20px;
    border-bottom: 1px solid #333;
    background: #222;
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
}

.filter-list-container {
    flex: 1;
    overflow-y: auto;
    height: 300px;
    min-height: 300px;
}

.filter-options-list {
    padding: 0;
}

.filter-list-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #333;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
}

.filter-list-option:hover {
    background: #2a2a2a;
    color: #fff;
}

.filter-list-option input[type="checkbox"] {
    margin: 0;
    accent-color: #7CC3E4;
}

.filter-cancel-btn {
    background: none;
    border: 1px solid #444;
    color: #999;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.filter-cancel-btn:hover {
    color: #fff;
    border-color: #666;
}

.filter-apply-btn {
    background: #7CC3E4;
    border: none;
    color: #000;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.filter-apply-btn:hover {
    background: #5aa3c7;
}

.filter-footer-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Custom Scrollbar for Filter Modal */
.filter-list-container::-webkit-scrollbar {
    width: 8px;
}

.filter-list-container::-webkit-scrollbar-track {
    background: #222;
}

.filter-list-container::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.filter-list-container::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.stocks-table {
    width: 100%;
    border-collapse: collapse;
    background: #121212;
}

.stocks-table th {
    background: #1a1a1a;
    color: #999;
    font-weight: 700;
    font-size: 14px;
    text-align: left;
    padding: 16px 12px;
    border-bottom: 1px solid #2a2a2a;
}

.stocks-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #2a2a2a;
    color: #e3e3e3;
}

.stocks-table tr:hover {
    background: #1a1a1a;
}

/* Stocks table column styles */
th.star-col,
td.star-col {
    width: 40px;
    text-align: center;
}

.watchlist-star {
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    user-select: none;
    color: #444;
    text-shadow: 0 0 1px #666;
}

.watchlist-star:hover {
    color: #caa999;
    transform: scale(1.1);
}

.watchlist-star.active {
    color: #caa999;
    text-shadow: 0 0 2px #caa999;
}
