/**
 * View Selector Styles
 * Phase 2: Liquid glass morphism design
 */

.view-selector-container {
    position: relative;
}

.view-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(10, 14, 39, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-selector-btn:hover {
    background: rgba(10, 14, 39, 0.6);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.view-selector-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.view-icon {
    font-size: 18px;
}

.view-name {
    white-space: nowrap;
}

.view-chevron {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
}

.view-selector-btn:hover .view-chevron {
    color: #00d4ff;
}

/* Dropdown */
.view-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 320px;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(0, 212, 255, 0.1);
    z-index: 1000;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.view-dropdown-header span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.view-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.view-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.view-dropdown-content {
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* View Options */
.view-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.view-option:hover {
    background: rgba(0, 212, 255, 0.1);
}

.view-option.active {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    margin: -1px;
}

.view-option-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.view-option-info {
    flex: 1;
}

.view-option-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.view-option-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.4;
}

.view-option-check {
    color: #00d4ff;
    flex-shrink: 0;
}

/* Footer */
.view-dropdown-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.view-customize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    color: #7c3aed;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-customize-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateY(-1px);
}

/* Loading Spinner Small */
.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar */
.view-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.view-dropdown-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.view-dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.view-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .view-selector-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .view-icon {
        font-size: 16px;
    }

    .view-name {
        display: none;
    }

    .view-dropdown {
        min-width: 280px;
        right: -10px;
    }

    .view-option {
        padding: 10px 12px;
    }

    .view-option-icon {
        font-size: 24px;
    }

    .view-option-name {
        font-size: 13px;
    }

    .view-option-desc {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .view-dropdown {
        min-width: calc(100vw - 40px);
        right: -120px;
    }
}

/* Accessibility */
.view-selector-btn:focus-visible,
.view-option:focus-visible,
.view-customize-btn:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .view-selector-btn,
    .view-option,
    .view-customize-btn,
    .view-chevron {
        transition: none;
    }

    .view-dropdown {
        animation: none;
    }

    .loading-spinner-small {
        animation: none;
    }
}
