/* ═══════════════════════════════════════════════════
   Стили модального окна оплаты
   Добавить в конец prices.css или в отдельный файл
════════════════════════════════════════════════════ */

/* Оверлей */
.payment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Само окно */
.payment-modal {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Крестик */
.payment-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #95a5a6;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.payment-modal-close:hover {
  color: #2c3e50;
}

/* Заголовки */
.payment-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  text-align: center;
}
.payment-modal-subtitle {
  font-size: 0.95rem;
  color: #7f8c8d;
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Социальные кнопки входа */
.btn-social-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.75rem;
}
.btn-google-signin:hover {
  border-color: #4a90e2;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}
.btn-apple-signin {
  background: #000;
  color: #fff;
  border-color: #000;
}
.btn-apple-signin:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Разделитель */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
  color: #b0bec5;
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

/* Email-форма */
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  color: #2c3e50;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.auth-input:focus {
  border-color: #4a90e2;
}
.auth-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  text-align: center;
}
.auth-toggle-text {
  text-align: center;
  font-size: 0.88rem;
  color: #7f8c8d;
  margin-top: 0.75rem;
}
.auth-toggle-link {
  color: #4a90e2;
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}
.auth-toggle-link:hover {
  text-decoration: underline;
}

/* ─── Карточка аккаунта ─────────────────────────────────────────── */
.account-card {
  background: #f8fbff;
  border: 1.5px solid #d0e4f7;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.account-card-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #2c3e50;
  font-size: 0.9rem;
  font-weight: 600;
  word-break: break-all;
}

.btn-text-danger {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-text-danger:hover {
  background: #fdecea;
}

.account-sub-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.sub-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.dot-green  { background: #27ae60; }
.dot-yellow { background: #f39c12; }
.dot-red    { background: #e74c3c; }
.dot-gray   { background: #bdc3c7; }

.sub-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sub-plan-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
}

.sub-meta {
  font-size: 0.82rem;
  color: #7f8c8d;
}

.btn-cancel-sub {
  background: none;
  border: 1.5px solid #e74c3c;
  color: #e74c3c;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
  margin-top: 0.25rem;
}
.btn-cancel-sub:hover {
  background: #e74c3c;
  color: #fff;
}
.btn-cancel-sub:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-detach-card {
  background: none;
  border: 1.5px solid #95a5a6;
  color: #7f8c8d;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
  margin-top: 0.25rem;
}
.btn-detach-card:hover {
  background: #95a5a6;
  color: #fff;
}
.btn-detach-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Мелкий текст под виджетом */
.payment-modal-note {
  font-size: 0.78rem;
  color: #95a5a6;
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

/* Лоадер */
.payment-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #ecf0f1;
  border-top-color: #4a90e2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Блок статуса подписки под прайсингом */
.subscription-status-card {
  background: #f0f7ff;
  border: 1px solid #c3daf7;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.subscription-status-card p {
  margin: 0 0 0.75rem;
  color: #2c3e50;
  font-size: 0.95rem;
  line-height: 1.5;
}
.subscription-status-card p:last-child {
  margin-bottom: 0;
}

/* Кнопка отмены */
.btn-danger {
  background: #e74c3c;
  color: white;
  border: none;
}
.btn-danger:hover {
  background: #c0392b;
}
.btn-small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .payment-modal {
    padding: 2rem 1.25rem;
    border-radius: 16px;
  }
}
