/* AHR • Discount Request popup (BuddyBoss-like, mobile-first)
   Scoped to Membership Plans feature */

.ahr-discount-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(92vw, 520px);
  max-width: 520px;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.ahr-discount-dialog[open] {
  animation: ahr-discount-pop-in 220ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.ahr-discount-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

@keyframes ahr-discount-pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ahr-discount-dialog-inner {
  display: flex;
  flex-direction: column;
}

/* Header (BuddyBoss-ish) */
.ahr-discount-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.ahr-discount-back {
  /* Hide back arrow per request */
  display: none;
}

.ahr-discount-back:hover {
  background: #f1f5f9;
}

.ahr-discount-close {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  margin-left: auto;
}

.ahr-discount-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ahr-discount-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ahr-discount-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
  border: none;
  margin-left: 6px;
}

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

.ahr-discount-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #7dd3fc, #2ba1e9);
}

.ahr-discount-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ahr-discount-title {
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
  line-height: 1.1;
}

.ahr-discount-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.1;
}

/* Body */
.ahr-discount-body {
  padding: 16px 16px 14px;
}

.ahr-discount-body[data-ahr-discount-state="success"]:not([hidden]),
.ahr-discount-body[data-ahr-discount-state="already"]:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: 240px;
}

.ahr-discount-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
  margin-bottom: 8px;
}

.ahr-discount-textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  padding: 12px 12px;
  font-size: 14px;
  line-height: 1.35;
  color: #0f172a;
  resize: vertical;
  min-height: 100px;
  outline: none;
}

.ahr-discount-textarea:focus {
  border-color: #2ba1e9;
  box-shadow: 0 0 0 4px rgba(43, 161, 233, 0.15);
}

/* Footer / send button */
.ahr-discount-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  position: relative;
  min-height: 40px;
}

.ahr-discount-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 14px;
  background: #2ba1e9;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.12s ease, background 0.12s ease;
}

.ahr-discount-send:hover {
  background: #228ad0;
  transform: translateY(-1px);
}

.ahr-discount-send[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.ahr-discount-send-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.ahr-discount-status {
  margin-top: 0;
  font-size: 13px;
  color: #64748b;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  max-width: calc(100% - 120px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ahr-discount-status.error {
  color: #dc2626;
}

/* Success / already states */
.ahr-discount-success {
  padding: 22px 16px 28px;
  text-align: center;
}

.ahr-discount-success-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.ahr-discount-success-icon-img {
  width: 44px;
  height: 44px;
  display: block;
}

.ahr-discount-success-title {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
}

.ahr-discount-success-sub {
  margin-top: 3px;
  font-size: 13px;
  color: #64748b;
}

.ahr-discount-close-btn {
  margin-top: 16px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.ahr-discount-close-btn:hover {
  background: #f8fafc;
}

