/* ══════════════════════════════════════════
   User Bubble — avatar-upload.css
   Shortcode [user_avatar_upload]
   ══════════════════════════════════════════ */

.ubu-wrap {
  font-family: Helvetica, Arial, sans-serif;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Área de preview ── */
.ubu-preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* ── Círculo de avatar ── */
.ubu-avatar-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  border: 3px solid #fff;
  outline: 3px solid var(--ub-primary, #334F9D);
}

.ubu-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder con inicial */
.ubu-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ub-primary, #334F9D);
  color: #fff;
  font-size: 38px;
  font-weight: 700;
}

/* Overlay al hover */
.ubu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity .2s ease;
  cursor: pointer;
  border-radius: 50%;
}
.ubu-overlay span {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.ubu-avatar-preview:hover .ubu-overlay,
.ubu-avatar-preview:focus-within .ubu-overlay {
  opacity: 1;
}

/* ── Info del usuario ── */
.ubu-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}
.ubu-user-info strong {
  font-size: 15px;
  color: #1e1e1e;
  font-weight: 700;
}
.ubu-user-info span {
  font-size: 12px;
  color: #777;
}
.ubu-formats {
  font-size: 11px;
  color: #aaa;
  font-style: normal;
  margin-top: 4px;
}

/* ── Barra de progreso ── */
.ubu-progress-wrap {
  position: relative;
  background: #e9ecef;
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin: 12px 0 4px;
}
.ubu-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ub-primary, #334F9D);
  border-radius: 20px;
  transition: width .2s ease;
}
.ubu-progress-label {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #777;
  margin-top: 3px;
}

/* ── Mensajes de estado ── */
.ubu-status {
  font-size: 13px;
  padding: 0;
  min-height: 20px;
  margin-top: 8px;
  text-align: center;
}
.ubu-status.is-success {
  color: #1e5631;
  background: #d4edda;
  border: 1px solid #b8dfc2;
  border-radius: 6px;
  padding: 9px 14px;
}
.ubu-status.is-error {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f1aeb5;
  border-radius: 6px;
  padding: 9px 14px;
}

/* ── Botones ── */
.ubu-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}
.ubu-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  font-family: Helvetica, Arial, sans-serif;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .1s;
}
.ubu-btn:hover { transform: translateY(-1px); }

.ubu-btn--danger {
  background: #fff0f0;
  color: #c0392b;
  border: 1px solid #f1aeb5;
}
.ubu-btn--danger:hover {
  background: #f8d7da;
}

/* ── Aviso sin sesión ── */
.ubu-notice {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
}
.ubu-notice a {
  color: var(--ub-primary, #334F9D);
  font-weight: 600;
  margin-left: 6px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .ubu-wrap { max-width: 100%; }
  .ubu-preview-area {
    align-items: center;
    gap: 14px;
  }
  .ubu-avatar-preview { width: 84px; height: 84px; }
}
