/**
 * Redzora Theme - Authentication, Membership & Badge Styles
 * LiteSpeed Cache Safe Client-Side Hydration
 */

/* Header User Slot */
.h2-user-slot {
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* Kompakt Oval Avatar Butonu */
.h2-user-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.h2-user-avatar-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  background: var(--theme-primary, var(--color-primary, #dc2626));
  background: linear-gradient(135deg, var(--theme-primary, var(--color-primary, #dc2626)) 0%, var(--color-primary-dark, #b91c1c) 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary, #dc2626) 30%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  line-height: 1;
}

.h2-user-avatar-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-primary, #dc2626) 45%, transparent);
}

.h2-user-avatar-btn.has-badge {
  border-color: #f59e0b;
}

.h2-user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.h2-user-avatar-letter {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
  font-family: inherit;
}

/* Mini Abonelik Rozet Noktası */
.h2-user-crown-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.h2-user-avatar-btn:not(.has-badge) .h2-user-crown-badge,
.h2-user-crown-badge:empty {
  display: none !important;
}

/* Eski pill desteği (geriye dönük uyumluluk) */
.h2-user-pill-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 999px;
  padding: 3px 6px 3px 4px;
  gap: 4px;
  transition: all 0.2s ease;
}
.h2-user-pill-wrap:hover {
  background: var(--color-surface-soft, #f8fafc);
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.h2-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text, #1e293b);
  font-size: 13px;
  font-weight: 700;
}

.h2-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary, #dc2626);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  overflow: hidden;
  flex-shrink: 0;
}
.h2-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h2-user-name {
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Member Badge */
.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.member-badge i {
  font-size: 9.5px;
}

/* User Dropdown Menu */
.h2-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 1000;
  display: none;
}
.h2-user-dropdown.is-open {
  display: block;
  animation: authFadeIn 0.15s ease-out;
}
.h2-user-dropdown__header {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
}
.h2-user-dropdown__avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--theme-primary, var(--color-primary, #dc2626));
  background: linear-gradient(135deg, var(--theme-primary, var(--color-primary, #dc2626)) 0%, var(--color-primary-dark, #b91c1c) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(0, 0, 0, 0.05);
}
.h2-user-dropdown__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.h2-user-dropdown__avatar .h2-user-avatar-letter {
  font-size: 16px;
  font-weight: 800;
}
.h2-user-dropdown__info {
  flex: 1;
  min-width: 0;
}
.h2-user-dropdown__info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.h2-user-dropdown__info span {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h2-user-dropdown a, 
.h2-user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.h2-user-dropdown a:hover, 
.h2-user-dropdown button:hover {
  background: #f8fafc;
  color: var(--color-primary, #dc2626);
}
.h2-user-dropdown hr {
  margin: 6px 0;
  border: none;
  border-top: 1px solid #f1f5f9;
}

/* Comment Form Auth Notice */
.comment-auth-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #166534;
  font-weight: 600;
}
.comment-auth-notice a {
  color: #15803d;
  text-decoration: underline;
  font-weight: 700;
}

/* Modal Overlay & Card */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.auth-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-modal-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-modal-overlay.is-open .auth-modal-card {
  transform: translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}
.auth-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.auth-modal-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.auth-modal-tab-btn {
  flex: 1;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.auth-modal-tab-btn.is-active {
  color: var(--color-primary, #dc2626);
  border-bottom-color: var(--color-primary, #dc2626);
  background: #ffffff;
}

.auth-modal-body {
  padding: 24px;
}

.auth-form-group {
  margin-bottom: 16px;
}
.auth-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.auth-form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.auth-form-control:focus {
  outline: none;
  border-color: var(--color-primary, #dc2626);
}

.auth-submit-btn {
  width: 100%;
  height: 44px;
  background: var(--color-primary, #dc2626);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 8px;
}
.auth-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}
.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Membership Plans Grid inside Modal */
.plans-modal-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}
.plan-item-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  transition: all 0.2s;
}
.plan-item-card:hover {
  border-color: var(--color-primary, #dc2626);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08);
}
.plan-item-card.is-popular {
  border-color: var(--color-primary, #dc2626);
  background: #fffafa;
}
.plan-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.plan-item-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.plan-item-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--color-primary, #dc2626);
}
.plan-item-price small {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.plan-item-features {
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plan-item-features li {
  font-size: 12.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}
.plan-item-features li i {
  color: #16a34a;
  font-size: 11px;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

