/* ===== Account button + dropdown ===== */
.wp-account{ position: relative; }

/* Modificatori di stato */
.wp-account.is-guest .wp-account__btn{ text-decoration: none; }
.wp-account.is-auth  .wp-account__btn{ cursor: pointer; }

/* Bottone base */
.wp-account__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: var(--ws-field-h);
  padding: 0 var(--ws-field-pad-x);
  border-radius: var(--ws-field-radius);
  border: 1px solid #ccc;
  background: transparent;
  color: #000; /* colore base (ereditato anche dallo SVG via currentColor) */
  font-size: var(--ws-text-size);
  font-weight: 600;
  text-decoration: none;
  gap: var(--ws-space);
  transition: color .25s ease, border-color .25s ease; /* transizione testo/bordo */
}
.wp-account__btn:hover,
.wp-account__btn:focus,
.wp-account__btn:active{
  color: #ffc107;
  border-color: #ffc107;
  outline: 0;
}

/* Icona (un solo SVG inline) */
.wp-account__ico{
  width: 20px;
  height: 20px;
  position: relative;
  display:inline-block;
  line-height: 0; /* evita spazi verticali indesiderati */
}

/* SVG: eredita il colore dal bottone */
.wp-account__ico svg{
  width:100%;
  height:100%;
  display:block;
}

/* Se lo <svg> contiene <path class="st0">, forza il fill a currentColor */
.wp-account__ico svg .st0{
  fill: #000;          /* segue il colore del bottone */
  transition: fill .15s ease;             /* animazione del cambio colore */
}

/* Se ci sono tracciati con stroke, animali e sincronizzali */
.wp-account__ico svg [stroke]{
  stroke: currentColor !important;
  transition: stroke .15s ease;
}

/* Label sincronizzata con il colore del bottone */
.wp-account__label {
  font-size: var(--ws-text-size);
  font-weight: var(--ws-btn-fw);
  color: #000;
  transition: color .15s ease;
}

/* Guest: etichetta a sinistra, icona a destra */
.wp-account.is-guest .wp-account__btn{
  flex-direction: row; /* label, poi icona */
}

.wp-account__btn:hover .wp-account__ico svg .st0 {
  fill: #ffc107;  
  stroke: #ffc107;
}

.wp-account__btn:hover .wp-account__label {
  color: #ffc107;  
}

.wp-account__btn:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,.18);
}

/* Dropdown */
.wp-account__menu{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 150px;
  background: #fff;
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius);
  box-shadow: var(--ws-shadow-2);
  padding: 8px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; /* esplicito */
  z-index: calc(var(--ws-z-head-side) + 2);
}
.wp-account--open .wp-account__menu{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wp-account__item{
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  padding: 6px 12px;
  width: 100%;
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transition: .15s ease;
  font-size: var(--ws-text-size);
  cursor: pointer;
}

.wp-account__item-label{
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transition: .15s ease;
  font-size: var(--ws-text-size);
  cursor: pointer;
}

.wp-account__item-label.logout {
  line-height: 1;
  margin-top: 3px;
}

.wp-account__item-ico { 
  display: inline-flex; 
  width: 14px; 
  height: 14px; 
  line-height: 0; 
}
.wp-account__item-ico svg {
  width: 18px; 
  height: 18px; 
  display: block;
}

.wp-account__item-ico svg .st0 {
  fill: #000;
  stroke: #000;
  transition: .15s ease;
}

.wp-account__item:hover .wp-account__item-ico svg .st0 {
  fill: var(--accent);
  stroke: var(--accent);
}

.wp-account__item-ico svg .st0:focus {
  fill: var(--accent);
}

.wp-account__item-label.logout{
  color: #c70000;
}

.svg-logout .st0 {
  fill: #c70000 !important;
  stroke: #c70000 !important;
  transition: .15s ease;
}

.wp-account__item:hover .svg-logout .st0 {
  fill: var(--accent) !important;
  stroke: var(--accent) !important;
}

.svg-logout .st0:focus {
  fill: #c70000;
  stroke: #c70000;
}

.wp-account__item:hover .wp-account__item-label,
.wp-account__item-label:focus {
  color: var(--accent);
  outline: 0;
}



/* (Rimossa la vecchia logica di doppia icona A/B e le transizioni su opacity) */

/* Nascondi il bottone+menu in stato guest */
.wp-account.is-guest .wp-account__menu { display: none; }

