/* ============================================================
   GPS Section – Styles
   ============================================================ */

/* Toggle row */
.gps-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0;
    border-top: 1px solid #eee;
}
.gps-toggle-label {
    font-size: inherit;
}
.gps-toggle-status {
    font-size: inherit;
    color: #888;
    font-style: italic;
}
/* Aligne le toggle Bootstrap avec le texte environnant */
.gps-toggle-row .form-check-input {
    width: 2.5em;
    height: 1.25em;
    cursor: pointer;
    margin-top: 0;
}

/* GPS Section (shown when toggle is on) */
.gps-section {
    margin-bottom: 1rem;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Geocode bar */
.geocode-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: #fdfdff;
    border-bottom: 1px solid #eee;
}
.geocode-bar input {
    flex: 1;
    padding: 0.55rem 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.geocode-bar input:focus { border-color: #f0ad4e; }

.btn-geocode {
    padding: 0.55rem 0.85rem;
    border: none;
    border-radius: 6px;
    background: #f0ad4e;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s;
}
.btn-geocode:hover { background: #e69d3a; }
.btn-geocode:disabled { opacity: 0.6; cursor: not-allowed; }

/* Map hint */
.map-hint {
    font-size: 0.85rem;
    color: #aaa;
    padding: 0.4rem 0.75rem;
    background: #fffde6;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Map container */
#gps-map {
    height: 220px;
    width: 100%;
    cursor: crosshair !important;
}

/* Coordinate inputs bar */
.coords-bar {
    display: flex;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: #fafafa;
    align-items: center;
    border-top: 1px solid #eee;
}
.coord-field {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
}
.coord-field label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #999;
    min-width: 26px;
}
.coord-field input {
    width: 100%;
    padding: 0.5rem 0.55rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.coord-field input:focus { border-color: #f0ad4e; }

.btn-apply {
    padding: 0.5rem 0.7rem;
    border: none;
    border-radius: 6px;
    background: #e9e9e9;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.btn-apply:hover { background: #ddd; }

/* Spinner for geocode button loading state */
.gps-section .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gps-spin 0.6s linear infinite;
}
@keyframes gps-spin { to { transform: rotate(360deg); } }
