/* ─────────────────────────────────────────────────────────────
   GoodCold — Widget de cuenta para el header
   Renderizado por shortcode [gc_header_cuenta]
   ───────────────────────────────────────────────────────────── */

.gc-account-widget {
  font-family: Arial, Helvetica, sans-serif;
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

/* ── Variante: NO logueado ─────────────────────────────────── */
.gc-account-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  color: #0B39F2;
  border: 1.5px solid #0B39F2;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1.2;
}
.gc-account-login:hover {
  background: #0B39F2;
  color: #fff !important;
}
.gc-account-login svg { flex-shrink: 0; }
.gc-account-login span { line-height: 1.2; }

/* ── Variante: LOGUEADO — trigger ──────────────────────────── */
.gc-account-menu { position: relative; }

.gc-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  background: #0B39F2;
  border: 1.5px solid #0B39F2;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  color: #fff;
  line-height: 1;
  min-height: 48px;
  box-sizing: border-box;
}
.gc-account-trigger:hover {
  background: #0a2fcc;
  border-color: #0a2fcc;
}
.gc-account-trigger[aria-expanded="true"] {
  background: #0a2fcc;
  border-color: #0a2fcc;
}

.gc-account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.gc-account-name {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  text-align: left;
}
.gc-account-greeting {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  font-weight: 400;
  line-height: 1.2;
}
.gc-account-username {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.gc-account-chevron {
  color: rgba(255,255,255,0.85);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.gc-account-trigger[aria-expanded="true"] .gc-account-chevron {
  transform: rotate(180deg);
  color: #fff;
}

/* ── Dropdown ──────────────────────────────────────────────── */
.gc-account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  padding: 8px 0;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.gc-account-menu.is-open .gc-account-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gc-account-dropdown__header {
  padding: 12px 16px 14px;
  border-bottom: 1px solid #E4E7EC;
  margin-bottom: 6px;
}
.gc-account-dropdown__name {
  margin: 0 !important;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}
.gc-account-dropdown__email {
  margin: 2px 0 0 !important;
  font-size: 12px;
  color: #888;
  word-break: break-all;
  line-height: 1.3;
}

.gc-account-dropdown__item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  line-height: 1.3;
}
.gc-account-dropdown__item:hover {
  background: #fafbff;
  color: #0B39F2 !important;
}
.gc-account-dropdown__item svg {
  flex-shrink: 0;
  color: #888;
  transition: color 0.15s;
}
.gc-account-dropdown__item:hover svg { color: #0B39F2; }

.gc-account-dropdown__divider {
  height: 1px;
  background: #E4E7EC;
  margin: 6px 0;
}

.gc-account-dropdown__item--logout { color: #c53030 !important; }
.gc-account-dropdown__item--logout svg { color: #c53030; }
.gc-account-dropdown__item--logout:hover {
  background: #fff5f5;
  color: #c53030 !important;
}
.gc-account-dropdown__item--logout:hover svg { color: #c53030; }

/* ── Mobile: dropdown a ancho completo ─────────────────────── */
@media (max-width: 768px) {
  .gc-account-username { display: none; }
  .gc-account-greeting { display: none; }
  .gc-account-trigger { padding: 4px; }
  .gc-account-chevron { display: none; }

  .gc-account-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    border-radius: 16px 16px 0 0;
    padding: 16px 0 24px;
    transform: translateY(100%);
  }
  .gc-account-menu.is-open .gc-account-dropdown { transform: translateY(0); }

  .gc-account-menu.is-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
  }

  .gc-account-dropdown__item {
    padding: 14px 20px;
    font-size: 15px;
  }
}
