/* Map Picker Widget Styles */

.map-picker-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.map-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #417690;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.map-picker-btn:hover {
    background: #205067;
}

.map-picker-btn svg {
    width: 14px;
    height: 14px;
}

/* Modal */
.map-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.map-picker-modal.active {
    display: flex;
}

.map-picker-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.map-picker-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.map-picker-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.map-picker-close:hover {
    color: #333;
}

.map-picker-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.map-picker-search {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.map-picker-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.map-picker-search input:focus {
    outline: none;
    border-color: #417690;
    box-shadow: 0 0 0 2px rgba(65, 118, 144, 0.2);
}

.map-picker-search button {
    padding: 10px 20px;
    background: #417690;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.map-picker-search button:hover {
    background: #205067;
}

.map-picker-map {
    flex: 1;
    min-height: 400px;
}

.map-picker-coords {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.map-picker-coords label {
    font-size: 13px;
    color: #666;
}

.map-picker-coords input {
    width: 140px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

.map-picker-coords input:focus {
    outline: none;
    border-color: #417690;
}

.map-picker-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

.map-picker-footer button {
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.map-picker-cancel {
    background: white;
    border: 1px solid #ddd;
    color: #666;
}

.map-picker-cancel:hover {
    background: #f0f0f0;
}

.map-picker-confirm {
    background: #417690;
    border: none;
    color: white;
}

.map-picker-confirm:hover {
    background: #205067;
}

/* Leaflet customizations */
.map-picker-map .leaflet-container {
    height: 100%;
    width: 100%;
}

.map-picker-marker-icon {
    background: #e74c3c;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Instructions tooltip */
.map-picker-instructions {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 1000;
    pointer-events: none;
}
