/* ETF Detail Styles */

/* ETF Right Panel - proper spacing between cards */
#etfDetailLayout .stock-detail-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ETF Description Card */
.etf-description-card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #333;
    margin-top: 20px;
}

.etf-description-header {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.etf-description-text {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
}

/* ETF Issuer Badge */
.etf-issuer-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(124, 195, 228, 0.1);
    border: 1px solid rgba(124, 195, 228, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #7cc3e4;
    margin-left: 10px;
    line-height: 1;
}

/* ETF Asset Class Tag */
.etf-asset-class {
    display: inline-flex;
    align-items: center;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: #4ade80;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
    line-height: 1;
}

/* ETF Metrics Section Header */
.etf-metrics-section-header {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

/* ETF Name Row - name + ISIN inline */
.etf-name-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

/* ETF ISIN display */
.etf-isin {
    font-size: 11px;
    color: #555;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.etf-sector-list,
.etf-country-list {
    padding: 10px 15px;
}

.etf-sector-item,
.etf-country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

.etf-sector-item:last-child,
.etf-country-item:last-child {
    border-bottom: none;
}

.etf-sector-name,
.etf-country-name {
    color: #fff;
    font-size: 13px;
}

.etf-sector-weight,
.etf-country-weight {
    color: #7cc3e4;
    font-size: 13px;
    font-weight: 600;
}

.etf-sector-bar {
    height: 4px;
    background: rgba(124, 195, 228, 0.2);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.etf-sector-bar-fill {
    height: 100%;
    background: #7cc3e4;
    border-radius: 2px;
}

/* ETF Holdings Table - clickable rows */
#etfHoldingsTable tr {
    cursor: pointer;
    transition: background 0.2s;
}

#etfHoldingsTable tr:hover {
    background: rgba(124, 195, 228, 0.1);
}

#etfHoldingsTable .holding-ticker {
    color: #7cc3e4;
    font-weight: 600;
}

/* ==================== ETF SECTION ==================== */

.etfs-layout {
    padding: 20px;
    width: 45%;
    min-width: 900px;
    margin: 0 auto;
    position: relative;
    background: #1F1F1B;
}

.etfs-container {
    background: #121212;
    border-radius: 12px;
    overflow: hidden;
    padding: 0 20px;
}

.etfs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-top: 20px;
    gap: 20px;
}

.etfs-title {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.etfs-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.etfs-search-input {
    width: 250px;
    padding: 8px 16px;
    background: #333;
    border: 1px solid #444;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
}

.etfs-search-input:focus {
    outline: none;
    border-color: rgba(124, 195, 228, 0.5);
}

.etfs-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;
}

.etfs-filter-btn:hover {
    background: #2a2a2a;
}

/* ETF Filter Modal - styled like stocks filter */
#etfFilterModal {
    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;
}

#etfFilterModal .modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    width: 420px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#etfFilterModal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#etfFilterModal .modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

#etfFilterModal .modal-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

#etfFilterModal .modal-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#etfFilterModal .filter-sections {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

#etfFilterModal .filter-accordion {
    border: 1px solid #333;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

#etfFilterModal .filter-accordion-header {
    padding: 12px 16px;
    background: #252525;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

#etfFilterModal .filter-accordion-header:hover {
    background: #2a2a2a;
}

#etfFilterModal .filter-accordion-header span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

#etfFilterModal .accordion-arrow {
    color: #999;
    transition: transform 0.2s;
}

#etfFilterModal .filter-accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

#etfFilterModal .filter-accordion-content {
    padding: 12px 16px;
    background: #1a1a1a;
    border-top: 1px solid #333;
}

#etfFilterModal .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#etfFilterModal .filter-chip {
    padding: 6px 12px;
    background: #252525;
    border: 1px solid #444;
    border-radius: 16px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

#etfFilterModal .filter-chip:hover {
    border-color: #7CC3E4;
    color: #7CC3E4;
}

#etfFilterModal .filter-chip.active {
    background: rgba(124, 195, 228, 0.2);
    border-color: #7CC3E4;
    color: #7CC3E4;
}

#etfFilterModal .filter-chip.see-all {
    background: transparent;
    border-color: #666;
    color: #7CC3E4;
    font-style: italic;
}

#etfFilterModal .filter-chip.see-all:hover {
    background: rgba(124, 195, 228, 0.1);
    border-color: #7CC3E4;
}

#etfFilterModal .filter-actions {
    padding: 16px 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

#etfFilterModal .btn-secondary {
    background: transparent;
    border: 1px solid #444;
    color: #999;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

#etfFilterModal .btn-secondary:hover {
    border-color: #666;
    color: #fff;
}

#etfFilterModal .btn-primary {
    background: linear-gradient(135deg, #7CC3E4 0%, #5BA3C4 100%);
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

#etfFilterModal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 195, 228, 0.3);
}

.etfs-table-wrapper {
    background: #121212;
    border-radius: 8px;
    overflow: hidden;
}

.etfs-table {
    width: 100%;
    border-collapse: collapse;
    background: #121212;
}

.etfs-table th {
    background: #1a1a1a;
    color: #999;
    font-weight: 700;
    font-size: 14px;
    text-align: left;
    padding: 16px 12px;
    border-bottom: 1px solid #2a2a2a;
}

.etfs-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #2a2a2a;
    color: #e3e3e3;
}

.etfs-table tr:hover {
    background: #1a1a1a;
    cursor: pointer;
}

.etfs-table .symbol-cell {
    font-weight: 600;
    color: #7CC3E4;
}

.etfs-table .name-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.etfs-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #121212;
    border-top: 1px solid #2a2a2a;
}

/* ETF Detail Modal */
.etf-detail-modal {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.etf-detail-content {
    padding: 20px;
}

.etf-detail-section {
    margin-bottom: 24px;
}

.etf-detail-section h4 {
    color: #7CC3E4;
    font-size: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.etf-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.etf-info-item {
    background: #1a1a1a;
    padding: 12px;
    border-radius: 8px;
}

.etf-info-item label {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}

.etf-info-item span {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.etf-holdings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.etf-holdings-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

.etf-holdings-list li:last-child {
    border-bottom: none;
}

.holding-name {
    color: #e3e3e3;
}

.holding-weight {
    color: #7CC3E4;
    font-weight: 500;
}

.etf-sector-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sector-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sector-name {
    width: 150px;
    color: #888;
    font-size: 13px;
}

.sector-bar-fill {
    flex: 1;
    height: 20px;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.sector-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #7CC3E4, #5BA3C4);
    border-radius: 4px;
}

.sector-percent {
    width: 50px;
    text-align: right;
    color: #7CC3E4;
    font-weight: 500;
}
