/* ==========================================================
   SENTIERI DIGITALI
   Tools Note Manager
   Grafica coordinata con Waypoint
   ========================================================== */

.maschera_segnalazione,
.maschera_nota {
    --nm-primary: #787554;
    --nm-button: rgb(230,229,219);
    --nm-text: #303030;
    --nm-muted: #777;
    --nm-border: #e1e1e1;
    --nm-radius: 10px;

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    color: var(--nm-text);
    font-size: 15px;
    line-height: 1.6;
}

/* INTESTAZIONE */

.nm-form-header {
    display: flex;
    align-items: center;
    gap: 14px;

    margin: 30px 0 26px;
}

.nm-form-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    min-width: 48px;

    border-radius: 50%;
    background: var(--nm-primary);
    color: #fff;

    font-size: 19px;
}

.nm-form-heading {
    flex: 1;
    min-width: 0;
}

.nm-form-heading h3 {
    margin: 0 0 3px;
    padding: 0;
    border: 0;

    color: var(--nm-text);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.3;
}

.nm-form-heading p {
    margin: 0;
    color: var(--nm-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* AVVISO */

.nm-required-notice {
    margin: 0 0 24px;
    padding: 11px 15px;

    background: #f7f7f4;
    border-left: 3px solid var(--nm-primary);
    border-radius: 0 6px 6px 0;

    color: #666;
    font-size: 13px;
}

/* FORM */

.maschera_segnalazione form,
.maschera_nota form {
    width: 100%;
}

.maschera_segnalazione form > p,
.maschera_nota form > p {
    margin: 0 0 25px;
}

/* ETICHETTE */

.maschera_segnalazione label,
.maschera_nota label {
    display: block;

    margin-bottom: 8px;

    color: var(--nm-text);
    font-size: 14px;
    font-weight: 600;
}

/* CAMPI */

.maschera_segnalazione input[type="text"],
.maschera_nota input[type="text"] {
    display: block;

    width: 100%;
    min-height: 48px;

    margin-top: 8px;
    padding: 12px 15px;

    box-sizing: border-box;

    background: #fff;
    color: var(--nm-text);

    border: 1px solid var(--nm-border);
    border-radius: var(--nm-radius);

    font-size: 15px;
    font-weight: 400;

    transition: border-color .2s, box-shadow .2s;
}

.maschera_segnalazione input[type="text"]:focus,
.maschera_nota input[type="text"]:focus {
    outline: none;
    border-color: var(--nm-primary);
    box-shadow: 0 0 0 3px rgba(120,117,84,.12);
}

/* EDITOR WORDPRESS */

.maschera_segnalazione .wp-editor-wrap,
.maschera_nota .wp-editor-wrap {
    margin-top: 12px;

    background: #fff;
    border: 1px solid var(--nm-border);
    border-radius: var(--nm-radius);

    overflow: hidden;
}

.maschera_segnalazione .wp-editor-tools,
.maschera_nota .wp-editor-tools {
    padding: 8px;

    background: #f7f7f4;
    border-bottom: 1px solid var(--nm-border);
}

.maschera_segnalazione .wp-editor-container,
.maschera_nota .wp-editor-container {
    border: 0;
}

.maschera_segnalazione textarea,
.maschera_nota textarea {
    width: 100%;
    box-sizing: border-box;
}


/* MAPPA LEAFLET */

.maschera_segnalazione .leaflet-container,
.maschera_nota .leaflet-container {
    border-radius: var(--nm-radius);
}

/* PULSANTI DI SALVATAGGIO */

.maschera_segnalazione button[type="submit"],
.maschera_nota button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 12px 24px;

    background: var(--nm-button);
    color: var(--nm-text);

    border: 1px solid #aaa891;
    border-radius: 9px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition: background .2s, box-shadow .2s;
}

.maschera_segnalazione button[type="submit"]:hover,
.maschera_nota button[type="submit"]:hover {
    background: #d8d6c8;
    color: #222;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

/* RESPONSIVE */

@media (max-width: 768px) {

    .nm-form-header {
        gap: 12px;
        margin: 20px 0 24px;
    }

    .nm-form-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 17px;
    }

    .nm-form-heading h3 {
        font-size: 20px;
    }

    .nm-form-heading p {
        font-size: 12px;
    }

    .maschera_segnalazione input[type="text"],
    .maschera_nota input[type="text"] {
        font-size: 16px;
    }

    .maschera_segnalazione button[type="submit"],
    .maschera_nota button[type="submit"] {
        width: 100%;
    }
}

/* ==========================================================
   SENTIERI DIGITALI
   PULSANTI EDITOR E LIBRERIA MEDIA WORDPRESS
   ========================================================== */

.maschera_segnalazione,
.maschera_nota {
    --nm-media-bg: rgb(230,229,219);
    --nm-media-hover: #d8d6c8;
    --nm-media-text: #303030;
    --nm-media-border: #b8b6a6;
}

/* ----------------------------------------------------------
   1. PULSANTE AGGIUNGI MEDIA NEL MODULO
   ---------------------------------------------------------- */

.maschera_segnalazione .wp-editor-tools button.insert-media,
.maschera_nota .wp-editor-tools button.insert-media {

    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: auto !important;
    min-height: 36px;
    height: auto;

    padding: 7px 13px;

    background: rgb(230,229,219) !important;
    color: #303030 !important;

    border: 1px solid #b8b6a6 !important;
    border-radius: 7px;

    font-size: 13px;
    font-weight: 600;
    line-height: 20px;

    box-shadow: none !important;
    text-shadow: none !important;
}

/* Testo e icona */

.maschera_segnalazione .insert-media,
.maschera_nota .insert-media,
.maschera_segnalazione .insert-media .wp-media-buttons-icon,
.maschera_nota .insert-media .wp-media-buttons-icon {

    color: #303030 !important;
}

/* Hover */

.maschera_segnalazione .wp-editor-tools button.insert-media:hover,
.maschera_nota .wp-editor-tools button.insert-media:hover {

    background: #d8d6c8 !important;
    color: #303030 !important;
    border-color: #787554 !important;
}

/* ----------------------------------------------------------
   2. FINESTRA MEDIA WORDPRESS
   ---------------------------------------------------------- */

/* Sfondo menu laterale */

body .media-modal .media-menu {
    background: #f7f7f4 !important;
}

/* Link del menu laterale */

body .media-modal .media-menu .media-menu-item {
    background: transparent !important;
    color: #303030 !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Voce attiva */

body .media-modal .media-menu .media-menu-item.active {
    color: #303030 !important;
    font-weight: 700;
    border-left: 3px solid #787554 !important;
}

/* ----------------------------------------------------------
   3. SCHEDE CARICA FILE / LIBRERIA MEDIA
   ---------------------------------------------------------- */

body .media-modal .media-router .media-menu-item {

    background: rgb(230,229,219) !important;
    color: #303030 !important;

    border: 1px solid #b8b6a6 !important;
    border-radius: 7px 7px 0 0;

    box-shadow: none !important;
    text-shadow: none !important;
}

/* Scheda selezionata */

body .media-modal .media-router .media-menu-item.active {

    background: rgb(230,229,219) !important;
    color: #303030 !important;

    border-bottom: 3px solid #787554 !important;
    font-weight: 700;
}

/* ----------------------------------------------------------
   4. TUTTI I PULSANTI DELLA FINESTRA MEDIA
   ---------------------------------------------------------- */

body .media-modal button.button,
body .media-modal .button,
body .media-modal .button-primary,
body .media-modal .button-secondary,
body .media-modal .button-hero,
body .media-modal .browser.button {

    background: rgb(230,229,219) !important;
    color: #303030 !important;

    border: 1px solid #b8b6a6 !important;
    border-radius: 7px;

    box-shadow: none !important;
    text-shadow: none !important;

    font-weight: 600;
}

/* Hover */

body .media-modal button.button:hover,
body .media-modal .button:hover,
body .media-modal .button-primary:hover,
body .media-modal .button-secondary:hover,
body .media-modal .button-hero:hover {

    background: #d8d6c8 !important;
    color: #303030 !important;

    border-color: #787554 !important;
}

/* ----------------------------------------------------------
   5. LINK DELLA FINESTRA MEDIA
   ---------------------------------------------------------- */

body .media-modal a {
    color: #303030 !important;
}

body .media-modal a:hover {
    color: #787554 !important;
}

/* ----------------------------------------------------------
   6. FOCUS
   ---------------------------------------------------------- */

body .media-modal button:focus-visible,
body .media-modal a:focus-visible {

    outline: 2px solid #787554 !important;
    outline-offset: 2px;
}

/* ----------------------------------------------------------
   7. RESPONSIVE
   ---------------------------------------------------------- */

@media (max-width: 600px) {

    body .media-modal .media-router .media-menu-item {
        font-size: 13px;
    }

    body .media-modal .button {
        font-size: 13px;
    }
}

/* ==========================================================
   SPAZIATURA SCHEDE LIBRERIA MEDIA
   ========================================================== */

body .media-modal .media-router {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding-left: 6px;
}

body .media-modal .media-router .media-menu-item {
    margin: 0 !important;
    border-radius: 7px 7px 0 0;
}

/* Evidenziazione scheda attiva */

body .media-modal .media-router .media-menu-item.active {
    border-bottom: 3px solid #787554 !important;
}

/* ==========================================================
   SENTIERI DIGITALI
   SEZIONE GEOGRAFICA - SEGNALAZIONI E NOTE
   ========================================================== */

.maschera_segnalazione .nm-geo-section,
.maschera_nota .nm-geo-section {
    margin: 32px 0 24px;
}

/* INTESTAZIONE CON PATTERN TOPOGRAFICO */

.nm-geo-header {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 20px;
    margin-bottom: 22px;

    border: 1px solid #e1e1e1;
    border-radius: 10px;

    background-color: #f7f7f4;
    background-image: url('/wp-content/themes/sentieri-digitali-left/background.svg');
    background-position: center;
    background-repeat: repeat;
    background-size: 420px auto;
}

/* ICONA */

.nm-geo-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    min-width: 46px;

    border-radius: 50%;
    background: #787554;
    color: #fff;

    font-size: 19px;
}

/* TESTI */

.nm-geo-heading {
    flex: 1;
    min-width: 0;
}

.nm-geo-heading h3 {
    margin: 0 0 4px;
    padding: 0;
    border: 0;

    color: #303030;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.nm-geo-heading p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* COORDINATE */

.nm-geo-coordinates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.nm-geo-field {
    min-width: 0;
}

.nm-geo-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #303030;
}

.maschera_segnalazione .nm-geo-field input,
.maschera_nota .nm-geo-field input {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* ISTRUZIONI */

.nm-geo-instructions {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 15px;
    padding: 13px 15px;

    background: rgb(230,229,219);
    color: #303030;

    border-radius: 8px;

    font-size: 13px;
    line-height: 1.5;
}

.nm-geo-instructions i {
    margin-top: 2px;
    color: #787554;
    font-size: 16px;
}

/* MAPPA */

.nm-geo-map {
    width: 100%;
    overflow: hidden;

    border: 1px solid #e1e1e1;
    border-radius: 10px;
}

.nm-geo-map .leaflet-container {
    border-radius: 9px;
}

/* RESPONSIVE */

@media (max-width: 600px) {

    .nm-geo-header {
        padding: 15px;
        gap: 12px;
    }

    .nm-geo-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 17px;
    }

    .nm-geo-heading h3 {
        font-size: 18px;
    }

    .nm-geo-coordinates {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .nm-geo-instructions {
        font-size: 12px;
    }
}

/* Istruzioni della mappa */

.nm-geo-instructions strong {
    display: inline-block;
    margin-bottom: 3px;
    color: #303030;
    font-weight: 700;
}

.nm-geo-instructions span i {
    color: #787554;
    margin: 0 3px;
}