﻿﻿ /* ============================================
   FORM TESORI - STILE UNIFORME ALLE CACCE
   ============================================ */
/* 1. FORM PRINCIPALE (stessa struttura caccia) */
.tesoro-expanded-form {
    background: white;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    padding: 0;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.3s ease;
}

/* 2. HEADER FORM TESORI MIGLIORATO */
.tesoro-expanded-form h6 {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-left-width: 3px;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    color: #0d47a1;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

    .tesoro-expanded-form h6 i {
        color: #1976d2;
        font-size: 1.25rem;
    }

    /* Effetto hover leggero */
    .tesoro-expanded-form h6:hover {
        background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }

/* 3. CARD STILE CACCE (trasforma card Bootstrap in sezioni caccia) */
.tesoro-expanded-form .card {
    background: #f8f9fa !important;
    border: none !important;
    border-radius: 8px !important;
    margin: 1rem 0 !important;
    border-left: 4px solid #0d6efd !important;
    overflow: hidden;
    box-shadow: none !important;
    padding: 0.25rem 0;
}

    /* Area Attenzione - bordo arancione */
    .tesoro-expanded-form .card:has(.fa-search) {
        border-left-color: #fd7e14 !important;
    }

    /* Area Caccia - bordo verde */
    .tesoro-expanded-form .card:has(.fa-crosshairs) {
        border-left-color: #198754 !important;
    }

/* Header card come caccia */
.tesoro-expanded-form .card-header {
    background: #e9ecef !important;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 1rem 1.5rem !important;
    margin: 0 !important;
    color: #212529 !important;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 0.75rem;
}

    .tesoro-expanded-form .card-header i {
        color: #495057 !important;
    }

/* Body card come caccia */
.tesoro-expanded-form .card-body {
    padding: 0.50rem !important;
}

/* Allinea a sinistra le LABEL dentro le card */
.tesoro-expanded-form .card:has(.fa-search) .form-group label,
.tesoro-expanded-form .card:has(.fa-crosshairs) .form-group label {
    text-align: left !important;
    justify-content: flex-start !important;
    display: block;
}

/* 4. GRUPPI FORM (stile caccia) */
.tesoro-expanded-form .form-group {
    margin-bottom: 0.75rem;
}

    .tesoro-expanded-form .form-group:last-child {
        margin-bottom: 0;
    }

    .tesoro-expanded-form .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: #495057;
        font-size: 0.95rem;
    }

        .tesoro-expanded-form .form-group label i,
        .tesoro-expanded-form .row-tipo-titolo label i {
            color: #6c757d;
            margin-right: 0.5rem;
            width: 16px;
        }

/* 5. CONTROLLI FORM (stesso stile caccia) */
.tesoro-expanded-form .form-control,
.tesoro-expanded-form .form-select,
.tesoro-expanded-form .row-tipo-titolo .form-control,
.tesoro-expanded-form .row-tipo-titolo .form-select {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s ease;
    background: white;
    line-height: 1.5;
}

.tesoro-expanded-form .form-control {
    height: 2.5rem;
}

.tesoro-expanded-form textarea.form-control {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.tesoro-expanded-form .form-control:focus,
.tesoro-expanded-form .form-select:focus,
.tesoro-expanded-form .row-tipo-titolo .form-control:focus,
.tesoro-expanded-form .row-tipo-titolo .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    outline: none;
}

/* 6. RIGHE DOPPIE (tipo+titolo, raggi+coordinate) */
.tesoro-expanded-form .row-double-field,
.tesoro-expanded-form .row-tipo-titolo {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.tesoro-expanded-form .double-field {
    flex: 1;
    min-width: 0;
}

/* Riga speciale per tipo+titolo */
.tesoro-expanded-form .row-tipo-titolo {
    margin: 0.5rem 1rem 0.75rem 1rem;
    padding: 0.5rem 0;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.tesoro-expanded-form .field-tipo,
.tesoro-expanded-form .field-titolo {
    flex: 1;
    min-width: 0;
    padding: 0 0.75rem;
}

/* Label dentro la riga tipo-titolo */
.tesoro-expanded-form .row-tipo-titolo label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.95rem;
    padding-left: 0.25rem;
}

/* 8. PULSANTI (stile caccia) */
.tesoro-expanded-form .d-flex.gap-2.justify-content-end.border-top.pt-3 {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin: 1rem 0 0 0;
    border-radius: 0 0 8px 8px;
}

.tesoro-expanded-form .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tesoro-expanded-form .btn-sm {
    padding: 0.5rem 1rem;
    min-width: auto;
    font-size: 0.875rem;
}

/* Varianti pulsanti */
.tesoro-expanded-form .btn-primary {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

    .tesoro-expanded-form .btn-primary:hover {
        background: #0b5ed7;
        border-color: #0a58ca;
    }

.tesoro-expanded-form .btn-outline-primary {
    background: transparent;
    color: #0d6efd;
    border-color: #0d6efd;
}

    .tesoro-expanded-form .btn-outline-primary:hover {
        background: #0d6efd;
        color: white;
    }

.tesoro-expanded-form .btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

    .tesoro-expanded-form .btn-outline-secondary:hover {
        background: #6c757d;
        color: white;
    }

.tesoro-expanded-form .btn-outline-danger {
    background: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

    .tesoro-expanded-form .btn-outline-danger:hover {
        background: #dc3545;
        color: white;
    }

/* ============================================
   NUOVO LAYOUT COORDINATE + RAGGIO + PULSANTE
   ============================================ */

/* Contenitore per coordinate e pulsante */
.tesoro-coordinate-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

/* Stile coordinate (come caccia) */
.tesoro-coordinate-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    color: #495057;
    background: rgba(25, 135, 84, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(25, 135, 84, 0.2);
    flex: 1;
    min-width: 200px;
}

/* Coordinate inline (affiancate) */
.tesoro-coordinate-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.tesoro-coordinate-valore {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #ce9178;
    background: rgba(206, 145, 120, 0.1);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(206, 145, 120, 0.2);
    flex: 1;
}

/* Coordinate small */
.tesoro-coordinate-value-small {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    color: #ce9178;
    background: rgba(206, 145, 120, 0.1);
    padding: 6px 10px;
    border-radius: 3px;
    border: 1px solid rgba(206, 145, 120, 0.2);
    margin-top: 2px;
}

/* Riga raggio */
.tesoro-raggio-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-weight: 500;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.tesoro-raggio-value {
    font-weight: 500;
    color: #495057;
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Riga raggio completa */
.tesoro-riga-raggio-completa {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.tesoro-input-raggio-compatto {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: white;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    width: 70px;
    text-align: center;
}

.tesoro-unita-compatto {
    color: #9cdcfe;
    font-size: 11px;
    font-weight: 500;
    min-width: 50px;
}

.tesoro-slider-compatto {
    flex: 1;
}

/* Pulsante stile caccia */
.btn-tesoro-posizione {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-tesoro-posizione:hover {
        background: #0b5ed7;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
    }

    .btn-tesoro-posizione i {
        font-size: 0.8rem;
    }

/* INTESTAZIONE POSIZIONE */
.tesoro-posizione-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

/* INTESTAZIONI TESORO (azzurre, non verdi) */
.tesoro-intestazione-tesoro {
    color: #9cdcfe !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    margin-bottom: 6px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.tesoro-label-inline {
    color: #9cdcfe;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 80px;
}

/* ============================================
   PARAMETRI AVANZATI - VARIE VERSIONI
   ============================================ */

/* Versione originale */
.parametri-avanzati-header {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    margin: 1.5rem 0 1rem 0;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parametro-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0dcaf0;
}

.parametro-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.parametro-icon {
    font-size: 1rem;
    color: #0dcaf0;
}

.parametro-titolo {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.parametro-separatore {
    color: #adb5bd;
    margin: 0 0.25rem;
}

.parametro-descrizione {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.parametro-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parametro-input {
    width: 100px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    text-align: center;
    font-weight: 500;
}

.parametro-unita {
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Versione compatta (dark theme) */
.tesoro-parametri-avanzati {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #1e1e1e;
    border-radius: 8px;
    border: 1px solid #3e3e42;
}

.tesoro-parametri-header {
    color: #9cdcfe;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #007acc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .tesoro-parametri-header i {
        color: #007acc;
        font-size: 13px;
    }

.tesoro-parametri-grid {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.5rem 1rem;
    align-items: center;
}

.tesoro-parametro-nome {
    font-size: 12px;
    font-weight: 600;
    color: #cccccc;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .tesoro-parametro-nome i {
        color: #569cd6;
        font-size: 11px;
        width: 16px;
        text-align: center;
    }

.tesoro-parametro-valori {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-self: end;
}

.tesoro-parametro-angolo {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #ce9178;
    min-width: 45px;
    text-align: right;
}

.tesoro-parametro-tolleranza {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #9cdcfe;
    min-width: 50px;
    text-align: center;
    background: rgba(156, 220, 254, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    border: 1px solid rgba(156, 220, 254, 0.2);
}

.tesoro-parametro-unita {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
    min-width: 50px;
    text-align: left;
}

.tesoro-parametro-simulazione {
    display: flex;
    gap: 0.5rem;
    justify-self: end;
}

.tesoro-btn-simula-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: transparent;
    border: 1px solid;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    justify-content: center;
}

.tesoro-btn-simula-bussola {
    color: #9cdcfe;
    border-color: #0d6efd;
}

    .tesoro-btn-simula-bussola:hover {
        background: rgba(13, 110, 253, 0.15);
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
    }

.tesoro-btn-simula-inclinazione {
    color: #ce9178;
    border-color: #d1696e;
}

    .tesoro-btn-simula-inclinazione:hover {
        background: rgba(209, 105, 110, 0.15);
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(209, 105, 110, 0.2);
    }

.tesoro-parametro-descrizione {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #858585;
    line-height: 1.4;
    margin-top: 0.1rem;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    font-style: italic;
}

.tesoro-parametro-separatore {
    grid-column: 1 / -1;
    height: 1px;
    background: #2d2d30;
    margin: 0.3rem 0;
}

/* ============================================
   SLIDER PER RAGGI TESORI
   ============================================ */

/* Contenitore slider */
.tesoro-slider-container {
    margin-bottom: 15px;
}

/* Riga etichetta + valore */
.tesoro-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tesoro-slider-label {
    color: #9cdcfe;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tesoro-slider-value {
    color: #ce9178;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', monospace;
    min-width: 60px;
    text-align: right;
}

/* Slider di sistema (nativo) */
.tesoro-slider,
.tesoro-slider-visibile {
    width: 100%;
    height: 6px;
    margin: 10px 0;
    cursor: pointer;
    background: #3e3e42;
    border-radius: 3px;
    outline: none;
}

.tesoro-slider-visibile {
    margin: 8px 0;
}

    .tesoro-slider-visibile::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #007acc;
        cursor: pointer;
        border: 2px solid #1e1e1e;
    }

    .tesoro-slider-visibile.attenzione::-webkit-slider-thumb {
        background: #fd7e14;
    }

    .tesoro-slider-visibile.caccia::-webkit-slider-thumb {
        background: #dc3545;
    }

/* Input numerico affiancato */
.tesoro-slider-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.tesoro-slider-input {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: white;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    width: 80px;
    text-align: center;
}

    .tesoro-slider-input:focus {
        border-color: #007acc;
        box-shadow: 0 0 0 1px rgba(0, 122, 204, 0.3);
        outline: none;
    }

.tesoro-slider-unit {
    color: #9cdcfe;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Range minimo/massimo */
.tesoro-slider-range {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: #6c757d;
}

.tesoro-slider-min,
.tesoro-slider-max {
    color: #6c757d;
    font-size: 10px;
}

/* PULSANTI IN FONDO FORM */
.tesoro-pulsanti-fondo {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #3e3e42;
}

.tesoro-btn-fondo {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.tesoro-btn-close {
    background: #2d2d30;
    color: #cccccc;
    border-color: #3e3e42;
}

.tesoro-btn-save {
    background: #0e639c;
    color: white;
    border-color: #1177bb;
}

.tesoro-btn-delete {
    background: #c42b1c;
    color: white;
    border-color: #d13424;
}

.tesoro-btn-fondo:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* AGGIUNTE CSS PER PULSANTI ATTIVI */
.btn-posizionamento-attivo {
    background: #198754 !important;
    color: white !important;
    border-color: #198754 !important;
    font-weight: bold;
}

    .btn-posizionamento-attivo:hover {
        background: #157347 !important;
        border-color: #157347 !important;
    }

/* AGGIUNTE CSS PER COORDINATE DEL TESORO */
.tesoro-form-field-group.coordinate-group {
    flex: 0 0 40%;
}

/* RESPONSIVE - TUTTE LE REGOLE RACCOLTE */
@media (max-width: 768px) {
    .tesoro-expanded-form {
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

        .tesoro-expanded-form .row-double-field,
        .tesoro-expanded-form .row-tipo-titolo {
            flex-direction: column;
            gap: 0.75rem;
        }

        .tesoro-expanded-form .row-tipo-titolo {
            margin: 0.5rem 0.75rem 0.75rem 0.75rem;
            padding: 0.75rem;
        }

        .tesoro-expanded-form .field-tipo,
        .tesoro-expanded-form .field-titolo {
            padding: 0;
        }

        .tesoro-expanded-form .d-flex.gap-2.justify-content-end.border-top.pt-3 {
            flex-direction: column;
            margin: 0;
            padding: 1.25rem;
        }

        .tesoro-expanded-form .btn {
            width: 100%;
        }

    .tesoro-coordinate-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .tesoro-coordinate-value {
        min-width: auto;
    }

    .tesoro-parametri-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .tesoro-parametro-valori {
        justify-self: start;
        margin-left: 1.5rem;
    }

    .tesoro-parametro-simulazione {
        justify-self: start;
        margin-left: 1.5rem;
    }

    .tesoro-parametro-descrizione {
        margin-left: 0;
        padding-left: 0;
    }
}

/* 10. ANIMAZIONI */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}



/* ============================================
   FIX: TESORO INPUT NUMERO - TEMA VS CODE
   ============================================ */

/* Classe per input numerici tema VS Code */
.tesoro-input-numero {
    background: #1e1e1e !important;
    border: 1px solid #3e3e42 !important;
    color: #ffffff !important;
    padding: 6px 10px !important;
    border-radius: 3px !important;
    font-family: 'Consolas', 'Monaco', monospace !important;
    font-size: 13px !important;
    width: 70px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

    /* Sovrascrivi il colore per placeholder e stato iniziale */
    .tesoro-input-numero::placeholder {
        color: #a0a0a0 !important;
        opacity: 1 !important;
    }

    /* Per input vuoti (valore = null) */
    .tesoro-input-numero:empty,
    .tesoro-input-numero[value=""] {
        color: #ffffff !important;
    }

    /* Focus state */
    .tesoro-input-numero:focus {
        border-color: #007acc !important;
        box-shadow: 0 0 0 1px rgba(0, 122, 204, 0.3) !important;
        outline: none !important;
    }

/* Fix per tutti gli input numerici nella sezione parametri */
.tesoro-parametri-grid input[type="number"] {
    background: #1e1e1e !important;
    border: 1px solid #3e3e42 !important;
    color: #ffffff !important;
    font-family: 'Consolas', 'Monaco', monospace !important;
}

/* Fix specifico per i campi inclinazione (coppia input) */
.tesoro-parametro-valori input[type="number"] {
    color: #ffffff !important;
    background: #252526 !important;
    border-color: #007acc !important;
}



/* ============================================
   SEZIONE FOTO TESORO
   ============================================ */

/* Preview container */
.tesoro-foto-preview-container {
    width: 100%;
    aspect-ratio: 4/3;
    background: #1e1e1e;
    border: 2px dashed #3e3e42;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.tesoro-foto-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tesoro-foto-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    display: flex;
    justify-content: center;
}

.tesoro-btn-foto-rimuovi {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

    .tesoro-btn-foto-rimuovi:hover {
        background: rgba(220, 53, 69, 1);
    }

/* Placeholder */
.tesoro-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

    .tesoro-foto-placeholder i {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        opacity: 0.5;
    }

    .tesoro-foto-placeholder span {
        font-size: 0.9rem;
    }

/* Upload controls */
.tesoro-foto-upload-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tesoro-btn-foto-upload {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    color: #9cdcfe;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

    .tesoro-btn-foto-upload:hover {
        background: #3e3e42;
        border-color: #007acc;
    }

.tesoro-foto-hint {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}




/* ============================================
   SEZIONE DI POSIZIONAMENTO SEARCHBOX 
   ============================================ */

/* Searchbox per posizionamento caccia */
.position-searchbox-container {
    position: relative;
    flex: 1;
    max-width: 250px;
    min-width: 200px;
}

.position-searchbox {
    width: 100%;
    padding: 0.375rem 2.2rem 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #212529;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out;
    box-sizing: border-box;
    height: 38px;
    line-height: normal;
}

    .position-searchbox:focus {
        border-color: #86b7fe;
        outline: 0;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

.position-searchbox-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 0.9rem;
}

/* Layout della riga */
.position-compact-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.position-compact-coordinates {
    flex: 0 0 auto;
    min-width: 220px;
}

.position-compact-separator {
    color: #dee2e6;
    font-weight: 300;
}


/* Contenitore riga posizione */
.tesoro-posizione-riga {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Coordinate più compatte */
.tesoro-coordinate-compact {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 220px;
}

.tesoro-separatore {
    color: #dee2e6;
    font-weight: 300;
}


/* Layout searchbox + coordinate sulla stessa riga */
.searchbox-coordinate-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.searchbox-container {
    flex: 1;
    position: relative;
}

.searchbox-input {
    padding-right: 2.5rem;
    width: 100%;
}

.searchbox-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.coordinates-display {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 220px;
}

.coord-label {
    font-weight: 600;
    color: #495057;
    margin-right: 0.5rem;
}

.coord-value {
    font-family: 'Courier New', monospace;
    color: #0d6efd;
}







/* ============================================
   COORDINATE SEARCHBOX TESORO - STILE UNIFICATO
   ============================================ */

/* Contenitore riga searchbox + coordinate */
.searchbox-coordinate-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Searchbox (prende più spazio) */
.searchbox-container {
    flex: 1;
    position: relative;
}

/* Contenitore coordinate compatto */
.coordinates-display {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 220px;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

/* Label coordinate */
.coord-label {
    color: #9cdcfe !important; /* Blu chiaro VS Code */
    font-size: 0.75rem !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
    margin-bottom: 0.1rem;
}

/* Valore coordinate (arancione VS Code) */
.coord-value {
    color: #ce9178 !important; /* Arancione VS Code per valori */
    font-family: 'Consolas', 'Monaco', monospace !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    background: rgba(206, 145, 120, 0.1) !important;
    padding: 0.3rem 0.5rem !important;
    border-radius: 3px;
    border-left: 2px solid #ce9178 !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    /* Coordinate vuote */
    .coord-value em {
        color: #6c757d !important;
        font-style: italic;
        font-size: 0.85rem;
    }

/* Stile coerente con le altre coordinate nel form tesoro */
.tesoro-posizione-riga .tesoro-coordinate-valore {
    color: #ce9178 !important; /* Arancione VS Code */
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    background: rgba(206, 145, 120, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    border-left: 2px solid #ce9178;
    margin-left: 0.5rem;
}

/* Responsive per schermi piccoli */
@media (max-width: 768px) {
    .searchbox-coordinate-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .coordinates-display {
        min-width: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.4rem 0.75rem;
    }

    .coord-label {
        margin-bottom: 0;
        margin-right: 0.5rem;
        font-size: 0.7rem !important;
    }

    .coord-value {
        font-size: 0.8rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* Effetto hover per consistenza */
.coordinates-display:hover {
    border-color: #007acc;
    transition: border-color 0.2s ease;
}

.coord-value:hover {
    background: rgba(206, 145, 120, 0.15) !important;
}




/* ============================================
   COORDINATE SEARCHBOX TESORI - STILE FINALE
   ============================================ */

/* 1. RIGA: Searchbox prende spazio, coordinate compatte a destra */
.searchbox-coordinate-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* 2. SEARCHBOX: Massimo spazio disponibile */
.searchbox-container.searchbox-expanded {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* 3. COORDINATE: Box compatto a destra - STILE IDENTICO alle altre coordinate */
.coordinates-display.coordinates-compact {
    flex: 0 0 auto;
    width: 165px !important;
    min-width: 165px !important;
    max-width: 165px !important;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

/* 4. LABEL: Stile identico alle altre label nel form tesoro */
.coordinates-compact .coord-label {
    color: #9cdcfe !important; /* Blu chiaro - COME TUTTE LE LABEL */
    font-size: 0.8rem !important;
    font-weight: 500;
    text-transform: none !important;
    margin-bottom: 2px;
    text-align: right;
    width: 100%;
}

/* 5. VALORE: STILE ESATTO come .tesoro-coordinate-valore */
.coordinates-compact .coord-value {
    color: #ce9178 !important; /* Arancione ESATTO */
    font-family: 'Consolas', 'Monaco', monospace !important;
    font-size: 0.85rem !important; /* Size ESATTO */
    font-weight: 500;
    background: rgba(206, 145, 120, 0.1) !important; /* Sfondo ESATTO */
    padding: 0.25rem 0.5rem !important; /* Padding ESATTO */
    border-radius: 3px;
    border-left: 2px solid #ce9178 !important; /* Bordo ESATTO */
    text-align: right;
    width: 100%;
    min-height: 28px; /* Altezza fissa per allineamento */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
}

    /* 6. Coordinate vuote - stile consistente */
    .coordinates-compact .coord-value em {
        color: #6c757d !important;
        font-size: 0.85rem !important;
        font-style: italic;
        font-family: inherit;
    }

/* 7. SU MOBILE: coordinate vanno sotto */
@media (max-width: 768px) {
    .searchbox-coordinate-row {
        flex-direction: column;
        align-items: stretch;
    }

    .coordinates-compact {
        width: 100%;
        margin-top: 8px;
    }

        .coordinates-compact .coord-label,
        .coordinates-compact .coord-value {
            text-align: left;
        }

        .coordinates-compact .coord-value {
            justify-content: flex-start;
        }
}



/* Riga secondaria parametri (più piccola) */
.tesoro-parametro-secondaria {
    grid-column: 2 / span 2;
    font-size: 0.75rem;
    color: #9cdcfe;
    margin-top: 2px;
    padding-left: 10px;
    border-left: 1px solid #3e3e42;
}

    /* Icona nella seconda riga */
    .tesoro-parametro-secondaria i {
        font-size: 0.7rem;
        color: #4ec9b0;
        margin-right: 5px;
    }