/* ==========================================================================
   SGP Shortcodes — Minimal standalone styles
   Loaded only when a shortcode is rendered.
   ========================================================================== */

/* sgp_header_user */

.sgp-header-user-btn {
  display: inline-flex;
  position: relative;
}

a.sgp-header-user-btn {
  background: #f1f5f9;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
}

.sgp-header-user-btn .sgp-header-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: inherit;
  background: #f1f5f9;
  border: 1px solid #f1f5f9;
  transition: background 0.2s;
}

.sgp-header-user-btn .sgp-header-user-btn:hover {
  border: 1px solid #f1f5f9;
  background: none;
}

.sgp-header-avatar-wrapper {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.sgp-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.sgp-header-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  font-size: 14px;
  font-weight: 700;
  border-color: transparent;
}

.sgp-header-avatar-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  border: 2px solid #fff;
}

.sgp-header-user-name {
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgp-header-chevron {
  font-size: 11px;
  opacity: 0.5;
  transition: transform 0.2s;
}

.sgp-header-user-btn[aria-expanded="true"] .sgp-header-chevron {
  transform: rotate(180deg);
}

.sgp-header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  padding: 8px;
}

.sgp-header-dropdown[hidden] {
  display: none;
}

.sgp-header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}

.sgp-header-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sgp-header-dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

a.sgp-header-dropdown-item--logout {
  color: #ef4444;
  padding: 7px;
}

a.sgp-header-dropdown-item--logout:hover {
  background: #fee2e2;
  color: #ef4444;
}

.sgp-header-dropdown-divider {
  height: 1px;
  background: #ddd;
  margin: 6px 8px;
}

/* Wallet balance in dropdown header */
.sgp-header-dropdown-wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.sgp-header-dropdown-wallet .fas {
  font-size: 16px;
  color: var(--sgp-primary);
  width: 16px;
  text-align: center;
}

.sgp-header-dropdown-wallet-label {
  font-size: 13px;
  color: #64748b;
  flex: 1;
}

.sgp-header-dropdown-wallet-amount {
  font-size: 14px;
  font-weight: 700;
  color: #10b880;
}

/* --------------------------------------------------------------------------
   General
   -------------------------------------------------------------------------- */

.sgp-purchased-loop-text {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
  background: #f3fbf8;
  padding: 5px 10px;
  border-radius: 8px;
}

.wpb_raw_code:has(.sgp-purchased-empty) {
  display: none !important;
}
