/**
 * ============================================================================
 * ArchiMap Tarzı Haritadan Serbest Alan Çizerek Arama (Radius & Polygon Search)
 * Alsatbu.com & Kişisel Arama Ajanları (v2) Entegrasyonu
 * ============================================================================
 */

/* Üst Çizim Araç Çubuğu (ArchiMap Floating Drawing Toolbar) */
.archimap-draw-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 4px 10px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    transition: all 0.25s ease;
}

.archimap-draw-btn {
    border: none;
    background: transparent;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.archimap-draw-btn:hover {
    background: #f1f5f9;
    color: #0284c7;
    transform: translateY(-1px);
}

.archimap-draw-btn.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.archimap-draw-btn.btn-alert {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    font-weight: 700;
    animation: archimapPulseSoft 2.5s infinite;
}

.archimap-draw-btn.btn-alert:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
}

.archimap-draw-btn.btn-clear {
    color: #ef4444;
}

.archimap-draw-btn.btn-clear:hover {
    background: #fef2f2;
    color: #dc2626;
}

@keyframes archimapPulseSoft {
    0% { transform: scale(1); box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35); }
    50% { transform: scale(1.02); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.55); }
    100% { transform: scale(1); box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35); }
}

/* Çizim Bilgi & İstatistik Paneli */
.archimap-stats-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 12.5px;
    transition: all 0.3s ease;
}

.archimap-stats-panel .stats-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    color: #38bdf8;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Radius Kontrol Açılır Kartı (Floating Radius Control) */
.archimap-radius-controller {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 90vw;
    animation: archimapFadeUp 0.3s ease-out;
}

@keyframes archimapFadeUp {
    from { opacity: 0; transform: translate(-50%, 15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.archimap-radius-slider {
    flex: 1;
    cursor: pointer;
    accent-color: #0284c7;
}

/* Çizim İpuçları Tooltip'i */
.archimap-draw-tooltip {
    position: absolute;
    z-index: 1001;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: none;
}

/* Çokgen Çizim Noktası Stili (Leaflet Vertex Icon) */
.archimap-vertex-pin {
    width: 14px;
    height: 14px;
    background: #0284c7;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.archimap-vertex-pin:hover {
    transform: scale(1.35);
    background: #ef4444;
}

/* Çember Merkez Pulsating Radar İkonu */
.archimap-center-radar {
    position: relative;
    width: 24px;
    height: 24px;
}
.archimap-center-radar::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.35);
    animation: archimapRadar 1.8s infinite ease-out;
}
.archimap-center-radar .core-dot {
    width: 12px;
    height: 12px;
    background: #0284c7;
    border: 2px solid #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    left: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
@keyframes archimapRadar {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Arama Ajanı Modal Stilleri */
.kpa-geo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    animation: archimapFadeIn 0.2s ease-out;
}

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

.kpa-geo-modal-card {
    background: #ffffff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: archimapModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes archimapModalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.kpa-geo-modal-header {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpa-geo-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kpa-geo-modal-body {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.kpa-geo-area-summary {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 12.5px;
    color: #0369a1;
}

.kpa-geo-form-group {
    margin-bottom: 14px;
}

.kpa-geo-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 5px;
}

.kpa-geo-form-group input,
.kpa-geo-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s;
}

.kpa-geo-form-group input:focus,
.kpa-geo-form-group select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.kpa-geo-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
