/**
 * Country Selector Widget Styles
 * Modal and UI components for country selection
 */

/* Modal Overlay */
.country-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

/* Modal Container */
.country-modal {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.2);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.country-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.country-modal-header h3 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.country-modal-header p {
    color: #999999;
    font-size: 16px;
}

/* Detected Country Display */
.country-detected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    margin: 20px 0;
}

.country-flag {
    font-size: 48px;
}

.country-name {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
}

/* Country Stats */
.country-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 25px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
}

.stat-value {
    display: block;
    color: #00d4ff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    color: #999999;
    font-size: 14px;
}

/* Question Text */
.country-question {
    text-align: center;
    color: #e0e0e0;
    font-size: 16px;
    margin: 25px 0;
}

/* Modal Actions */
.country-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.country-modal-actions button {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-confirm {
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #ffffff;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn-change {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-change:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Country List Modal */
.country-list-modal {
    max-width: 600px;
}

.country-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.country-options::-webkit-scrollbar {
    width: 8px;
}

.country-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.country-options::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    border-radius: 10px;
}

/* Country Option */
.country-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-option:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(5px);
}

.country-option .country-flag {
    font-size: 32px;
}

.country-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.country-info .country-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.country-currency {
    color: #999999;
    font-size: 14px;
}

.country-arrow {
    color: #00d4ff;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.country-option:hover .country-arrow {
    opacity: 1;
}

/* Header Country Selector Button */
#country-selector-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

#country-selector-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
}

#country-selector-btn .view-mode-icon {
    font-size: 18px;
}

#country-selector-btn .country-flag {
    font-size: 20px;
}

#country-selector-btn .country-name {
    font-size: 14px;
    font-weight: 600;
}

#country-selector-btn .dropdown-arrow {
    font-size: 10px;
    color: #00d4ff;
}

/* View Mode Toggle */
.view-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 25px 0;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.toggle-option.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.toggle-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toggle-info strong {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.toggle-info span {
    color: #999999;
    font-size: 12px;
    line-height: 1.4;
}

.country-modal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 30px 0;
}

.country-modal-subheader {
    text-align: center;
    margin-bottom: 20px;
}

.country-modal-subheader h4 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.country-modal-subheader p {
    color: #999999;
    font-size: 14px;
}

.modal-footer {
    margin-top: 25px;
    text-align: center;
}

.btn-close {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .country-modal {
        padding: 30px 20px;
        max-width: 95%;
    }

    .country-modal-header h3 {
        font-size: 24px;
    }

    .country-detected {
        padding: 20px;
    }

    .country-flag {
        font-size: 36px;
    }

    .country-name {
        font-size: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .country-stats {
        grid-template-columns: 1fr;
    }

    .country-options {
        max-height: 300px;
    }

    .view-mode-toggle {
        grid-template-columns: 1fr;
    }

    .toggle-option {
        padding: 15px;
    }

    .toggle-icon {
        font-size: 24px;
    }

    .toggle-info strong {
        font-size: 14px;
    }

    .toggle-info span {
        font-size: 11px;
    }
}
