/* IPInfoViewer_Phase2.css - Phase 2 進階功能樣式 */

/* ========== QR Code 模態框 ========== */
.qr-code-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.qr-code-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideInUp 0.3s ease;
}

.qr-code-content h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.qr-code-hint {
    color: #718096;
    font-size: 0.9rem;
    margin: 15px 0;
    line-height: 1.6;
}

.qr-code-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.qr-code-actions button {
    flex: 1;
}

/* ========== 地圖模態框 ========== */
.map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.map-modal-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease;
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.map-modal-header h3 {
    color: #667eea;
    margin: 0;
    font-size: 1.3rem;
}

.map-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    transition: color 0.2s;
}

.map-modal-close:hover {
    color: #667eea;
}

.map-container {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .map-container {
        height: 400px;
    }

    .map-modal-content {
        padding: 15px;
    }
}

/* ========== 地理位置資訊卡片 ========== */
.geo-info-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.geo-info-card h4 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Leaflet 地圖樣式調整 */
.leaflet-container {
    font-family: 'Noto Sans TC', sans-serif;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 15px;
    font-size: 0.95rem;
}

/* ========== 動畫 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 地理位置載入狀態 ========== */
.geo-loading {
    text-align: center;
    padding: 30px;
    color: #718096;
}

.geo-loading i {
    font-size: 2rem;
    color: #667eea;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 響應式設計 ========== */
@media (max-width: 576px) {
    .qr-code-content {
        padding: 20px;
    }

    .qr-code-actions {
        flex-direction: column;
    }

    .qr-code-actions button {
        width: 100%;
    }
}
