/* CSS Mobile-First base */


/* --- Stili generali --- */
body {
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
  padding: 0;
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

main.necrologia-container {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* --- Sezioni del defunto --- */
.dati-defunto {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  text-align: center;
}

.dati-defunto h1 {
  font-size: 28px;
  margin-bottom: 5px;
}

.dati-defunto p {
  margin: 5px 0;
}

/* --- Testi necrologia e mappe --- */
.testi-necrologia p {
  margin-bottom: 15px;
}

.testi-necrologia .mappa {
  margin: 10px 0;
  padding: 10px;
  background: #eef2f5;
  border-left: 3px solid #0073aa;
}

/* --- Ricordi --- */
.ricordi-pubblici h2,
.sezione-ricordi h2 {
  margin-top: 40px;
}


/* Topbar */
.topbar {
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 999;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  height: 60px;
}

/* Colonne */
.topbar-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Logo */
.logo img {
  height: 38px;
  display: block;
}

/* Icone (cart, user, hamburger) */
.icon {
  font-size: 24px;
  color: #333;
  text-decoration: none;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.icon:hover {
  color: #0073aa;
}

/* Hamburger specifico */
.hamburger-menu {
  font-size: 26px;
  padding: 0;
}

/* Breadcrumb sotto */
.breadcrumb-bar {
  background-color: #f5f5f5;
  padding: 13px 15px;
  font-size: 14px;
  color: #666;
  /*border-top: 1px solid #eee;*/
  /*border-bottom: 1px solid #ddd;*/
}

.breadcrumb-text {
  	margin: 0;
	text-transform: uppercase;
}

.home .breadcrumb-bar {
	display: none;
}

/* Responsive (opzionale) */
@media (max-width: 600px) {
  .logo img {
    height: 30px;
  }

  .icon {
    font-size: 20px;
  }
}


.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}




/* necrologia */
.cover-image img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #ddd;
}

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /*padding: 12px 15px;*/
  background: #fff;
  /*border-bottom: 1px solid #eee;*/
}

.actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions-right {
  display: flex;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

.counter {
  font-size: 14px;
  color: #666;
  margin-right: 8px;
}

.profilo-defunto {
  text-align: left !important;
  background: #fff;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.profilo-defunto h1 {
  font-size: 24px;
  margin-bottom: 5px;
}

.date-line {
  font-size: 14px;
  color: #888;
}




/* Breadcrumb */

.breadcrumb-back {
  display: inline-block;
  font-size: 14px;
  color: #0073aa;
  text-decoration: none;
  text-transform: uppercase;
}

.breadcrumb-back:hover {
  text-decoration: underline;
}





/* homepage */

.necrologie-archive .page-title {
  text-align: center;
  font-size: 1.8rem;
  margin: 20px 0;
}

.grid-necrologie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  padding-bottom: 60px;
}

.necrologia-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.necrologia-card:hover {
  transform: scale(1.02);
}

.card-image {
  background-size: cover;
  background-position: center;
  aspect-ratio: 1 / 1;
}

.card-image.placeholder {
  background: #eee;
}

.card-info {
  padding: 10px;
  font-size: 0.9rem;
}

.card-info .name {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.card-info .meta {
  display: flex;
  gap: 10px;
  font-size: 0.85rem;
  color: #555;
}



/* box dettagli necrologio */

/* Box Luogo (Decesso, Funerali, Cimitero) */
.box-luogo {
  background: #fff;
  border-left: 4px solid #ccc;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.box-luogo h3 {
  margin-top: 0;
  font-size: 1.2em;
  color: #333;
}

.box-luogo p {
  font-weight: bold;
  color: #555;
  margin: 10px 0;
}

.btn-mappa-toggle {
  background: #0073aa;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  margin-top: 10px;
}

.btn-mappa-toggle:hover {
  background: #005f8d;
}

.mappa-google {
  display: none;
  margin-top: 15px;
}

/*
Theme Name: Tema Mobile
Author: Danilo
Version: 1.0
Description: Tema WordPress minimal e mobile-first
*/

body {
  margin: 0;
  font-family: system-ui, sans-serif;
}

.animazione-invio {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    opacity: 0;
    transform: scale(0.3);
    animation: preghieraZoom 1.2s ease-out forwards;
  }
  
  @keyframes preghieraZoom {
    0% {
      transform: scale(0.3);
      opacity: 0;
    }
    50% {
      transform: scale(1.05);
      opacity: 1;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
  
  /* Scomparsa dopo 2s */
  .animazione-invio.fade-out {
    transition: opacity 0.5s ease;
    opacity: 0;
  }
  

  .ricordi-pubblici {
    margin-top: 40px;
    border-top: 1px solid #ccc;
    padding-top: 20px;
  }
  
  .ricordo-box {
    background: #f9f9f9;
    border-left: 4px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .ricordo-meta {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
  }
  
  .ricordo-meta .data {
    float: right;
    font-style: italic;
  }
  
  .ricordo-testo {
    font-size: 1.1em;
    line-height: 1.5;
  }
  
  .ricordo-azioni {
    margin-top: 10px;
    display: flex;
    gap: 15px;
  }
  
  .ricordo-azioni button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    padding: 0;
    color: #555;
  }
  
  .ricordo-azioni button:hover {
    color: #000;
  }
  
  .form-risposta {
    margin-top: 10px;
    padding: 10px;
    background: #f3f3f3;
    border-radius: 4px;
  }
  
  .btn-preghiera {
    background: #f3f3f3;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 1em;
    color: #333;
  }
  
  /* Stato attivo: già pregato */
  .btn-preghiera.pregato {
    background: #ffe0e0;
    color: #a00;

  }
  
  /* Icona */
  .btn-preghiera .icon-svg img {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: auto;
  }
  
  /* Stato errore (es: hai già votato) */
  .btn-preghiera.errore-preghiera {
    background-color: #ffdede;
    color: #a00;
  }
  
  /* Messaggio di errore */
  .preghiera-messaggio {
    color: #a00;
    background: #ffe5e5;
    padding: 5px 10px;
    margin-top: 5px;
    font-size: 0.9em;
    border-left: 3px solid #e00;
    border-radius: 4px;
  }
  
  .form-ricordo-container {
    padding: 10px;
    background: #fafafa;
    border-radius: 10px;
    margin-bottom: 20px;
  }
  
  .form-ricordo-container form input,
  .form-ricordo-container form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9rem;
  }
  
  .form-ricordo-container form textarea {
    min-height: 80px;
    resize: vertical;
  }
  
  .form-ricordo-container .row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .form-ricordo-container .row .col {
    width: 100%;
  }
  
  @media (min-width: 600px) {
    .form-ricordo-container .row {
      flex-direction: row;
    }
  
    .form-ricordo-container .row .col {
      width: 50%;
    }
  }
  
  .form-ricordo-container button[type="submit"] {
    background: #a00;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  
  .form-ricordo-container button[type="submit"]:hover {
    background: #800000;
  }
  

  .necrologia-container {
    padding: 20px;
  }
  
  .necrologia-inner {
    max-width: 700px;
    margin: 0 auto;
  }
  

  .btn-preghiera.pregato {
    background-color: #f5e5e5;
    color: #c00;
    font-weight: bold;
  }
  
  .btn-preghiera .count {
    display: inline-block;
    min-width: 20px;
    text-align: center;
  }
  

  .btn-preghiera {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: none;
    background-color: #f5f5f5;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .btn-preghiera.pregato {
    background-color: #d6f5d6;
    color: #111;
  }
  
  .btn-preghiera .count {
    font-weight: bold;
    min-width: 18px;
  }
  
  .btn-preghiera:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .flash-count {
    animation: flashCountAnim 0.3s ease;
  }
  
  @keyframes flashCountAnim {
    0% { transform: scale(1.3); color: green; }
    100% { transform: scale(1); color: inherit; }
  }
  

  .message {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  }
  
  .message-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .avatar-circle {
    width: 40px;
    height: 40px;
    background: #eee;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
  }
  
  .avatar-circle img {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .meta-info {
    display: flex;
    flex-direction: column;
  }
  
  .user-name {
    font-weight: bold;
    font-size: 1.1em;
  }
  
  .message-date {
    font-size: 0.85em;
    color: #777;
  }
  
  .message-body p {
    margin: 0;
    font-size: 1em;
    color: #333;
  }
  
  .message-actions {
    margin-top: 12px;
    display: flex;
    gap: 15px;
    align-items: center;
  }
  
  .message-actions .btn-preghiera {
    display: inline-flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 6px 10px;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .message-actions .btn-preghiera.pregato {
    background: #e6f2e6;
    font-weight: bold;
    color: #2b8a3e;
  }
  
  .message-actions .btn-preghiera img {
    width: 18px;
  }
  
  .message-actions .btn-rispondi,
  .message-actions .btn-segnala {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 0.9em;
  }
  
  .message-actions .btn-rispondi:hover,
  .message-actions .btn-segnala:hover {
    text-decoration: underline;
  }
  
  .form-risposta {
    margin-top: 15px;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
  }
  

/* ===== POPUP COMMENTO — bottom sheet mobile ===== */
#form-ricordo-popup {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: #fff;
  z-index: 1200;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.18);
  display: none;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  flex-direction: column;
}

#form-ricordo-popup.attivo {
  display: flex !important;
  flex-direction: column;
}

/* Handle visivo drag */
#form-ricordo-popup::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

/* Barra header popup con titolo e chiudi */
#form-ricordo-popup .popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 6px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

#form-ricordo-popup .popup-header-title {
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: .04em;
}

#form-ricordo-popup .btn-close-popup {
  background: none;
  border: none;
  font-size: 22px;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 50%;
  flex-shrink: 0;
}

#form-ricordo-popup .btn-close-popup:hover {
  color: #a00;
  background: #f5f5f5;
}

/* Contenuto scrollabile */
#form-ricordo-popup .form-ricordo-container {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 14px 16px 40px;
}



/* BOX COMMENTO */

.box-commento-singolo, .ricordo-box {
    background: #f2f4f7;
    padding: 15px;
    border-radius: 0 !important;
    margin-bottom: 20px;
    /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); */
}

.btn-leggi-tutti {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: #0073aa;
  color: white;
  border-radius: 5px;
  text-decoration: none;
}
.manda-pensiero-bar.always-visible {
  position: fixed;
  bottom: 100px;
  left: 0;
  width: 100%;
  background: white;
  border-top: 1px solid #ddd;
  padding: 10px;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.1);
  text-align: center;
}


.ricordo-box:last-of-type {
  margin-bottom: 100px; /* sufficiente per non coprire il box fisso */
}

.icon-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	color: inherit;
	font-weight: 500;
}
.icon-link img {
	display: inline-block;
	vertical-align: middle;
}


.commento-principale {
  border-left: 4px solid #0073aa;
}


.like-pagina-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.like-pagina-btn img {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease;
}

.like-pagina-btn.liked img {
  transform: scale(1.2);
}



.moderazione-tools {
  margin-top: 5px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.info-segnalazioni {
  font-size: 13px;
  color: #b94a48;
  font-style: italic;
}


.ricordo-box.nascosto {
  opacity: 0.4;
  pointer-events: auto;
  position: relative;
}

.ricordo-box.nascosto::before {
  content: "Messaggio nascosto";
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 12px;
  color: #b94a48;
  font-style: italic;
}


.filtro-commenti {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}


.auth-links .button {
  display: inline-block;
  background-color: #0073aa;
  color: white;
  padding: 10px 20px;
  margin: 0 5px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.auth-links .button:hover {
  background-color: #005f8d;
  text-decoration: none;
}


.galleria-ricordo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.galleria-ricordo img.img-ricordo {
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.galleria-ricordo img.img-ricordo:hover {
  transform: scale(1.05);
}



.youtube-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: auto;
  cursor: pointer;
}
.youtube-thumbnail {
  width: 100%;
  display: block;
}
.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  padding: 10px 20px;
}


.icon-btn img {
    display: inline-block;
    vertical-align: middle;
}

.icon-btn.share-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn.share-btn img {
  width: 24px;
  height: 24px;
}


/* testo uno due e tre */
.box-testi-omaggio {
  margin: 20px 0;
  /* padding: 10px 15px; */
  /* background: #fff; */
  /* border-radius: 10px; */
  /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); */
}

.testo-omaggio {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.testo-omaggio .icona {
  font-size: 24px;
  margin-right: 12px;
  line-height: 1.4;
}

.testo-omaggio .testo {
  font-size: 16px;
  color: #333;
  line-height: 1.5;
}

.testo-omaggio:last-child {
  margin-bottom: 0;
}




* {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.box-luogo,
.profilo-defunto,
.action-bar,
.box-commento-singolo,
.ricordo-box,
.box-testi-omaggio,
.form-ricordo-container,
.share-popup-inner {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}



@media (max-width: 600px) {
  body,
  main.necrologia-container,
  .necrologia-inner {
    padding-left: 10px;
    padding-right: 10px;
  }

  .box-luogo,
  .profilo-defunto,
  .action-bar,
  .manda-pensiero-bar,
  .box-commento-singolo,
  .form-ricordo-container {
    margin-left: 0;
    margin-right: 0;
  }
}



/* BOX stile lapide */
.box-luogo {
    border-left: 0;
    /* border: 1px solid #e0dccc; */
    border-radius: 0 !important;
    /* padding: 20px; */
    margin-bottom: 20px;
    box-shadow: none !important;
    background-color: #f2f4f7;
}

/* Titoli dei box */
.box-luogo h3 {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 10px;
}

.box-luogo h3::after {
  content: "";
  width: 60px;
  height: 3px;
  background: #b4a58e; /* tono pietra/lapide */
  display: block;
  margin: 8px auto 0;
  border-radius: 3px;
}

/* Testo indirizzo */
.box-luogo p {
  font-size: 1rem;
  color: #555;
  text-align: center;
  font-weight: 500;
}

.box-lapide {
  /*border: 1px solid #e0dccc;*/
  /*border-radius: 8px;*/
  /*padding: 20px;*/
  margin-bottom: 24px;
  /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);*/
}

.box-lapide h2,
.box-lapide h3 {
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 10px;
}

.box-lapide h2::after,
.box-lapide h3::after {
  content: "";
  width: 60px;
  height: 3px;
  background: #b4a58e;
  display: block;
  margin: 8px auto 0;
  border-radius: 3px;
}

.intestazione-lapide {
    /* background: #fdf9f1; */
    /* border: 1px solid #e0dccc; */
    /* border-radius: 8px 8px 0 0; */
    /* padding: 16px; */
    /* margin-bottom: 0; */
    /* text-align: center; */
}

.intestazione-lapide h2,
.intestazione-lapide h3 {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 8px;
  position: relative;
}

.intestazione-lapide h2::after,
.intestazione-lapide h3::after {
  content: "";
  width: 60px;
  height: 3px;
  background: #b4a58e;
  display: block;
  margin: 8px auto 0;
  border-radius: 3px;
}


.profilo-defunto {
  text-align: center;
  margin-bottom: 30px;
}

.profilo-defunto h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profilo-defunto .date-line {
  font-size: 1rem;
  color: #666;
  /*font-style: italic;*/
}

p.date-line span {
    font-family: 'bebas neue';
    font-size: 19px;
	padding-right: 5px;
}



/* Contenitori */
.sezione-ricordi,
.box-commento-singolo {
	margin-bottom: 30px;
	margin-top: 10px;
}

/* Contenuto interno */
.contenuto-ricordo {
  /*background: #fff;*/
  padding: 20px;
  border-radius: 0 0 8px 8px;
}

/* Stile blocco commento */
.commento-singolo {
  text-align: center;
  padding: 10px 15px;
  font-size: 1.1rem;
  color: #333;
}

.commento-singolo blockquote {
  font-style: italic;
  margin: 0 auto 10px;
  padding: 0;
  line-height: 1.5;
  quotes: "“" "”";
}

.commento-singolo blockquote::before {
  content: open-quote;
  font-size: 2rem;
  line-height: 0;
  vertical-align: -0.4em;
  color: #aaa;
}

.commento-singolo blockquote::after {
  content: close-quote;
  font-size: 2rem;
  line-height: 0;
  vertical-align: -0.4em;
  color: #aaa;
}

.autore-commento {
  font-weight: bold;
  color: #555;
  font-size: 0.95rem;
  margin-top: 5px;
}

/* Bottone “leggi tutti” */

.box-commento-singolo .btn-leggi-tutti{
	background: #333333;
}

.btn-leggi-tutti {
    display: inline-block;
    margin-top: 15px;
    text-decoration: none;
    background: #a90b2b;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    color: #fff;
    transition: background 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    text-align: center;
}

.btn-leggi-tutti:hover {
	background: #a90b2b;
	color: #fff;
}


/* ===== COMMENTS PANEL: nascondi barra esterna "Manda un Pensiero" ===== */
.ncr-comments-open .manda-pensiero-fissa {
  display: none !important;
}

/* Spazio in fondo ai commenti per non essere coperti dalla barra "Scrivi" */
body.ncr-comments-open main.necrologia-container {
  padding-bottom: 80px;
}

/* "Scrivi un pensiero" bar: al di sopra della nav bar */
.manda-pensiero-bar.always-visible {
  bottom: 0;
  z-index: 1100;
}

/* ===== OVERLAY backdrop quando popup è aperto ===== */
#form-ricordo-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1199;
}

#form-ricordo-popup-backdrop.attivo {
  display: block;
}

/* ===== FORM FIELDS migliorati per mobile ===== */
#form-ricordo-popup .form-ricordo-container form input[type="text"],
#form-ricordo-popup .form-ricordo-container form input[type="email"],
#form-ricordo-popup .form-ricordo-container form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: #fafafa;
  box-sizing: border-box;
  -webkit-appearance: none;
}

#form-ricordo-popup .form-ricordo-container form textarea {
  min-height: 100px;
  resize: vertical;
}

#form-ricordo-popup .form-ricordo-container button[type="submit"] {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  border-radius: 8px;
  margin-top: 6px;
}

.ncr-avviso--errore {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: .93rem;
}

/* ===== FORM INLINE nel pannello commenti ===== */
.ncr-form-inline #form-ricordo-popup {
  position: static !important;
  display: flex !important;
  flex-direction: column;
  max-height: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 0;
  z-index: auto !important;
  transform: none !important;
  opacity: 1 !important;
}
/* nasconde il drag handle (solo per bottom-sheet) */
.ncr-form-inline #form-ricordo-popup::before {
  display: none;
}
/* nasconde il bottone chiudi nel contesto inline */
.ncr-form-inline .btn-close-popup {
  display: none !important;
}
/* toglie il padding extra dal contenuto scrollabile */
.ncr-form-inline #form-ricordo-popup .form-ricordo-container {
  padding: 14px 16px 20px;
}

.woocommerce form.checkout {
  background: #fffdf9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px #ddd;
  max-width: 960px;
  margin: 40px auto;
  font-family: "Helvetica Neue", sans-serif;
}

.woocommerce form.checkout h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  color: #333;
}

.woocommerce form.checkout .form-row {
  margin-bottom: 20px;
}

.woocommerce form.checkout .form-row label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #444;
}

.woocommerce form.checkout .form-row input.input-text,
.woocommerce form.checkout .form-row select,
.woocommerce form.checkout .form-row textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
}

.woocommerce form.checkout .form-row input.input-text:focus,
.woocommerce form.checkout .form-row select:focus,
.woocommerce form.checkout .form-row textarea:focus {
  border-color: #0073aa;
  outline: none;
}

.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  border: 1px solid #eee;
  padding: 10px;
  text-align: left;
}

.woocommerce-checkout-payment {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.woocommerce-checkout-payment ul.payment_methods {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-checkout-payment ul.payment_methods li {
  margin-bottom: 15px;
}

.woocommerce-checkout-payment .place-order {
  margin-top: 30px;
  text-align: right;
}

.woocommerce-checkout-payment .place-order button.button {
  background-color: #0073aa;
  color: white;
  padding: 12px 25px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.woocommerce-checkout-payment .place-order button.button:hover {
  background-color: #005f8c;
}


/* Contenitore principale */
.woocommerce {
  padding: 40px 20px;
  background-color: #f9f9f9;
}

/* Wrapper del form checkout */
.woocommerce form.checkout {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Spaziatura tra le sezioni */
.woocommerce form.checkout h3 {
  margin-top: 40px;
  margin-bottom: 25px;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
  font-size: 1.6rem;
  color: #222;
}

/* Spazio extra nei campi */
.woocommerce form.checkout .form-row {
  margin-bottom: 25px;
}

/* Bottoni */
.woocommerce-checkout-payment .place-order button.button {
  padding: 14px 32px;
  font-size: 1.1rem;
  border-radius: 8px;
}

/* Riepilogo ordine */
.woocommerce-checkout-review-order-table {
  margin-top: 40px;
  border: 1px solid #e1e1e1;
  background: #fafafa;
}


/* Contenitore principale del checkout */
.wp-block-woocommerce-checkout {
  padding: 40px 20px;
  background-color: #f9f9f9;
  box-sizing: border-box;
}

/* Wrapper interno */
.wp-block-woocommerce-checkout > div {
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Titoli delle sezioni */
.wp-block-woocommerce-checkout h2,
.wp-block-woocommerce-checkout h3 {
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 1.5rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 6px;
  color: #333;
}

/* Spaziatura tra i blocchi */
.wp-block-woocommerce-checkout .wc-block-components-form {
  gap: 20px;
}

/* Bottoni */
.wp-block-woocommerce-checkout button,
.wp-block-woocommerce-checkout .components-button {
  padding: 14px 28px;
  font-size: 1.1rem;
  border-radius: 8px;
}

/* Riepilogo ordine */
.wp-block-woocommerce-checkout .wc-block-checkout__order-summary {
  background: #fafafa;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
  border: 1px solid #e5e5e5;
}


/* Rimuove spaziature e altezze inutili */
.wc-block-components-notices,
.with-scroll-to-top__scroll-point {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

/* Fix generale per i contenitori che diventano bianchi */
.wc-block-checkout,
.woocommerce {
  background-color: #fffdf9 !important;
  color: #222 !important;
}

/* Imposta uno sfondo coerente anche per gli avvisi (se visibili) */
.wc-block-components-notice,
.wc-block-components-notice__content {
  background-color: #fdf7e7 !important;
  color: #222 !important;
  border: 1px solid #ddd !important;
  padding: 12px;
  border-radius: 5px;
}

/* Fix per migliorare leggibilità su sfondi chiari */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  background-color: #fff;
  color: #222;
  border: 1px solid #ccc;
}

/* Imposta il colore del testo dei label e titoli */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td,
.woocommerce .woocommerce-checkout h3,
.woocommerce-checkout h2 {
  color: #333 !important;
}
.wc-block-components-notice-snackbar-list {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}
