/**
 * KatS Map Layers Styles
 * Styles for KatS elements displayed on the map
 */

/* ==================== Marker Styles ==================== */

.kats-map-marker {
    background: transparent !important;
    border: none !important;
}

.kats-marker-icon {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.kats-marker-icon i {
    transform: rotate(45deg);
    color: white;
    font-size: 14px;
}

.kats-marker-icon.inactive {
    filter: grayscale(50%);
}

/* ==================== Layer Control ==================== */

.kats-layer-control {
    margin-top: 10px;
}

.kats-layers-btn {
    width: 34px;
    height: 34px;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.kats-layers-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.kats-layers-btn.active {
    background: #6366f1;
    color: white;
}

.kats-layers-btn.active:hover {
    background: #4f46e5;
}

/* ==================== Popup Styles ==================== */

.kats-popup {
    min-width: 250px;
    max-width: 320px;
}

.kats-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    border-radius: 4px 4px 0 0;
    margin: -14px -14px 10px -14px;
}

.kats-popup-header i {
    font-size: 14px;
}

.kats-popup-body {
    padding: 0;
}

.kats-popup-body h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.kats-popup-body p {
    margin: 6px 0;
    font-size: 13px;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.kats-popup-body p i {
    width: 16px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 2px;
}

.kats-popup-body a {
    color: #3b82f6;
    text-decoration: none;
}

.kats-popup-body a:hover {
    text-decoration: underline;
}

.kats-popup-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.kats-popup-status.active {
    background: #dcfce7;
    color: #16a34a;
}

.kats-popup-status.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.kats-popup-status.planned {
    background: #dbeafe;
    color: #2563eb;
}

.kats-popup-status.closed {
    background: #fef2f2;
    color: #dc2626;
}

.kats-popup-status.ok {
    background: #dcfce7;
    color: #16a34a;
}

.kats-popup-status.warning {
    background: #fef3c7;
    color: #d97706;
}

.kats-popup-status.critical {
    background: #fef2f2;
    color: #dc2626;
}

.kats-popup-priority {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    margin-right: 6px;
}

.kats-popup-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.kats-popup-btn {
    width: 100%;
    padding: 8px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.kats-popup-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* ==================== Leaflet Popup Overrides ==================== */

.leaflet-popup-content-wrapper {
    padding: 0;
}

.leaflet-popup-content {
    margin: 14px;
}

/* ==================== Responsive ==================== */

@media (max-width: 768px) {
    .kats-popup {
        min-width: 200px;
        max-width: 280px;
    }

    .kats-popup-body h4 {
        font-size: 14px;
    }

    .kats-popup-body p {
        font-size: 12px;
    }
}
