/* ================================================= */
/* GLASSMORPHISM SEARCH POPUP - CSS */
/* ================================================= */

/* Glassmorphism Display Field */
.select-glass {
    position: relative;
    margin-bottom: 15px;
}

.display-glass {
    width: 100%;
    padding: 18px 54px 18px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1f2937;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    min-height: 60px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.display-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.display-glass:active {
    transform: translateY(0);
}

.display-glass.empty {
    color: #6b7280;
    font-weight: 400;
}

.display-glass.has-value {
    color: #111827;
    font-weight: 600;
}

.icon-glass {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    pointer-events: none;
    transition: all 0.3s;
}

.select-glass:hover .icon-glass {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.popup-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Popup Modern/Glass */
.popup-modern {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-header {
    padding: 28px 28px 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.popup-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.popup-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-search {
    padding: 20px;
    background: #f8f9fa;
}

.search-wrapper {
    position: relative;
}

.search-input-popup {
    width: 100%;
    padding: 16px 16px 16px 52px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    background: white;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
}

.search-input-popup:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    width: 20px;
    height: 20px;
}

.popup-options {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.popup-option {
    padding: 18px 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
    background: white;
    border: 2px solid transparent;
    min-height: 56px;
}

.popup-option:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.popup-option.current {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    font-weight: 600;
    color: #667eea;
}

.popup-option.current::before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.popup-option.selected {
    animation: selectPulse 0.4s ease;
}

@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { 
        transform: scale(0.98); 
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
        color: white; 
    }
    100% { transform: scale(1); }
}

.popup-option.no-results {
    color: #9ca3af;
    cursor: default;
    font-style: italic;
    justify-content: center;
}

.popup-option.no-results:hover {
    background: white;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .popup-modern {
        max-height: 90vh;
        max-width: 95%;
    }

    .popup-option {
        min-height: 60px;
        padding: 20px;
    }

    .search-input-popup {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}