/**
 * Kingdom Nexus - Location Detection Modal Styles
 * Version: 1.0
 */

.knx-location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.knx-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.knx-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.knx-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.knx-modal-close:hover {
    color: #333;
}

.knx-modal-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: iconBounce 0.6s ease-out;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.knx-modal-content h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #111;
}

.knx-modal-content p {
    margin: 8px 0;
    color: #666;
    font-size: 16px;
}

.knx-modal-distance {
    color: #0b793a !important;
    font-weight: 600;
}

/* Loading Spinner */
.knx-modal-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top-color: #0b793a;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Nearby Hubs List */
.knx-nearby-hubs-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.knx-nearby-hub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.knx-nearby-hub:hover {
    background: #e0f2fe;
    transform: translateX(4px);
}

.knx-nearby-hub-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.knx-nearby-hub-info strong {
    color: #111;
    font-size: 16px;
}

.knx-hub-distance {
    color: #0b793a;
    font-size: 14px;
    font-weight: 600;
}

.knx-btn-select {
    padding: 8px 20px;
    background: #0b793a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.knx-btn-select:hover {
    background: #095a2b;
}

/* Hub Cards Highlight */
.knx-hub-card {
    transition: all 0.3s;
}

.knx-hub-card.knx-card-highlight {
    animation: cardPulse 1s ease-in-out 3;
    box-shadow: 0 0 0 4px #0b793a !important;
}

@keyframes cardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Success State */
.knx-modal-success .knx-modal-icon {
    color: #0b793a;
}

/* Error State */
.knx-modal-error .knx-modal-icon {
    color: #dc2626;
}

/* Responsive */
@media (max-width: 640px) {
    .knx-modal-content {
        padding: 32px 24px;
        width: 95%;
    }
    
    .knx-modal-content h3 {
        font-size: 20px;
    }
    
    .knx-nearby-hub {
        flex-direction: column;
        gap: 12px;
    }
    
    .knx-btn-select {
        width: 100%;
    }
}
