/* KartiTaro — subscription / quota modal (matches AI chat v2). */
.subscription-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 13000;
}

.subscription-modal[hidden] {
  display: none !important;
}

.subscription-modal__backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(4, 6, 18, 0.78);
  inset: 0;
  position: absolute;
}

.subscription-modal__panel {
  background: linear-gradient(175deg, #14102a 0%, #080a18 100%);
  border: 1px solid rgba(186, 128, 255, 0.32);
  border-radius: 20px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(151, 61, 255, 0.12);
  max-width: 22rem;
  padding: 1.35rem 1.25rem 1.1rem;
  position: relative;
  width: min(100%, 22rem);
}

.subscription-modal__close {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  position: absolute;
  right: 0.65rem;
  top: 0.5rem;
}

.subscription-modal__close:hover {
  color: #fff;
}

.subscription-modal__title {
  color: #f5f3ff;
  font-family: Montserrat, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 2rem 0.5rem 0;
}

.subscription-modal__text {
  color: rgba(245, 243, 255, 0.72);
  font-family: Montserrat, sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.subscription-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.subscription-modal__label {
  color: rgba(245, 243, 255, 0.8);
  display: flex;
  flex-direction: column;
  font-family: Montserrat, sans-serif;
  font-size: 0.82rem;
  gap: 0.4rem;
}

.subscription-modal__input {
  background: rgba(22, 18, 42, 0.95);
  border: 1px solid rgba(186, 128, 255, 0.28);
  border-radius: 12px;
  color: #f5f3ff;
  font-family: Montserrat, sans-serif;
  font-size: 1rem;
  outline: none;
  padding: 0.65rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.subscription-modal__input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.subscription-modal__input:focus {
  border-color: rgba(186, 128, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(38, 219, 255, 0.12);
}

.subscription-modal__email-hint {
  color: rgba(186, 128, 255, 0.9);
  font-family: Montserrat, sans-serif;
  font-size: 0.82rem;
  margin: 0;
  word-break: break-all;
}

.subscription-modal__btn {
  background: rgba(186, 128, 255, 0.18);
  border: 1px solid rgba(186, 128, 255, 0.35);
  border-radius: 999px;
  color: #f5f3ff;
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.subscription-modal__btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.subscription-modal__btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.subscription-modal__btn--primary {
  background: linear-gradient(135deg, rgba(38, 219, 255, 0.88), rgba(186, 128, 255, 0.92));
  border: 0;
  color: #0a0816;
}

.subscription-modal__link {
  background: transparent;
  border: 0;
  color: rgba(186, 128, 255, 0.9);
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 0.82rem;
  margin-top: 0.15rem;
  padding: 0;
  text-align: center;
  text-decoration: underline;
}

.subscription-modal__status {
  color: rgba(245, 243, 255, 0.65);
  font-family: Montserrat, sans-serif;
  font-size: 0.82rem;
  margin: 0.75rem 0 0;
  min-height: 1.2rem;
}

.subscription-modal__status.is-error {
  color: #ff8fa8;
}

body.subscription-modal-open {
  overflow: hidden;
}

.ai-chat-v2-auth-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-family: Montserrat, sans-serif;
  font-size: 0.78rem;
  gap: 0.35rem 0.65rem;
  justify-content: center;
  margin-top: 0.45rem;
  padding: 0 0.25rem;
}

.ai-chat-v2-auth-bar__email {
  color: rgba(186, 128, 255, 0.92);
}

.ai-chat-v2-auth-bar__badge {
  color: rgba(38, 219, 255, 0.9);
}

.ai-chat-v2-footer-login {
  background: transparent;
  border: 0;
  color: rgba(186, 128, 255, 0.9);
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 0.8rem;
  margin-top: 0.45rem;
  padding: 0;
  text-decoration: underline;
}

.ai-chat-v2-footer-login[hidden],
.ai-chat-v2-auth-bar[hidden] {
  display: none !important;
}

.ai-chat-v2-auth-bar__logout {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 0.75rem;
  padding: 0;
  text-decoration: underline;
}
