/* Стили для страниц авторизации */

/* Убираем промежуток между контентом и футером на страницах авторизации */
.content-wrapper {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Убираем промежуток между auth-page и футером */
.auth-page {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Убираем промежуток у футера на страницах авторизации */
footer {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.auth-page-wrapper,
.auth-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  margin: 0;
  background-attachment: fixed;
  background-size: cover;
}

/* На мобильных устройствах делаем полноэкранную версию */
@media (max-width: 768px) {
  .auth-page-wrapper,
  .auth-page {
    min-height: 100vh;
    height: 100vh;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 1000;
    overflow-y: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
}

.auth-container {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.auth-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
}

/* Стили для форм */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #fff;
  color: #374151;
}

.form-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* Стили для чекбоксов */
.form-checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: #fff;
  color: #0ea5e9;
  margin-right: 0.5rem;
}

.form-checkbox:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-checkbox-label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

/* Стили для кнопок */
.auth-button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #0284c7;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-button:hover {
  background: #0369a1;
}

.auth-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Стили для ссылок */
.auth-link {
  color: #0284c7;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}

.auth-link:hover {
  color: #0369a1;
}

/* Стили для ошибок */
.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
}

.error-message::before {
  content: "⚠";
  margin-right: 0.25rem;
}

/* Стили для уведомлений */
.notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.notification-content {
  display: flex;
  align-items: center;
  flex: 1;
}

.notification-icon {
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.notification-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.notification-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.notification-error {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.notification-success {
  background-color: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

.notification-info {
  background-color: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

/* Специальное уведомление о неподтверждённом email */
.notification-unverified {
  background-color: #fff7ed; /* светло-оранжевый */
  border-color: #f97316;
  color: #92400e;
}

.notification-unverified .notification-content{flex-direction:column;align-items:flex-start;}

/* Улучшенная кнопка действия */
.notification .action-button {
  width: auto;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  border: none;
  color: #fff;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(37,99,235,.3);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.notification .action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,99,235,.45);
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.shake {
  animation: shake 0.4s ease-in-out;
}

/* Стили для вкладок */
.tab-container {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 1rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: all 0.2s;
}

.tab.active {
  color: #0284c7;
}

.tab.active::after {
  background: #0284c7;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
  display: block;
}

/* Стили для чекбоксов соглашений */
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.checkbox-wrapper:hover {
  background-color: #f3f4f6;
}

.checkbox-wrapper input[type="checkbox"] {
  margin-top: 0.125rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.checkbox-label {
  line-height: 1.5;
  color: #374151;
  font-size: 0.875rem;
}

.checkbox-link {
  color: #2563eb;
  text-decoration: underline;
  transition: all 0.2s;
}

.checkbox-link:hover {
  color: #1d4ed8;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .auth-page {
    padding-top: 100px !important;
    align-items: flex-start !important;
    min-height: 100vh !important;
    height: 100vh !important;
    overflow-y: auto !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
  
  .auth-container {
    max-width: 25.2rem;
    margin-top: 0;
    height: auto;
  }
  
  .auth-card {
    padding: 1.5rem;
    max-height: none;
    overflow-y: visible;
    transform: scale(0.9);
    transform-origin: top center;
    height: auto;
  }

  .notification {
    padding: 0.75rem;
  }

  .notification-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .notification-icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
  .auth-page {
    padding-top: 70px !important;
    min-height: 100vh !important;
    height: 100vh !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
  
  .auth-container {
    max-width: 22.4rem;
    height: auto;
  }
  
  .auth-card {
    transform: scale(0.8);
    padding: 1.25rem;
    height: auto;
    max-height: none;
    overflow-y: visible;
  }
}

/* Дополнительные стили для мобильной прокрутки */
@media (max-width: 768px) {
  body {
    overflow-y: auto !important;
    position: relative !important;
  }
  
  html {
    overflow-y: auto !important;
  }
  
  .auth-page {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background-attachment: fixed;
    background-size: cover;
  }
  
  .auth-card {
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Обеспечиваем покрытие градиентом всей страницы */
  .auth-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    pointer-events: none;
  }
}

/* ===================== Модальное окно подтверждения email ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease;
  z-index: 1000;
}
.modal-overlay.show {opacity:1; visibility:visible;}

.modal {
  background:#fff;
  padding:2rem 1.75rem;
  border-radius:1rem;
  box-shadow:0 15px 35px rgba(0,0,0,.25);
  width:fit-content;
  max-width:90vw;
  max-height:90vh;
  overflow-y:auto;
  text-align:center;
  position:relative;
  display:inline-block !important;
  animation:modalPop .35s ease forwards;
}
@keyframes modalPop{0%{opacity:0;transform:scale(.85);}100%{opacity:1;transform:scale(1);}}

.modal-body{margin:1rem 0 1.25rem;}
.modal-footer{margin-top:1rem;}
.modal button.auth-button{width:auto;min-width:180px;}
.modal-close{position:absolute;top:.75rem;right:.75rem;background:none;border:none;font-size:1.25rem;color:#6b7280;cursor:pointer;transition:color .2s;}
.modal-close:hover{color:#111827;}

/* Скрываем лишнее модальное окно, которое не нужно на странице входа */
#limitReachedModal {display:none !important;} 

/* ==== Переопределяем потенциальные стили Bootstrap для .modal ==== */
.modal-overlay .modal{
  position:relative !important; /* отменяем fixed Bootstrap */
  top:auto !important;
  bottom:auto !important;
  left:auto !important;
  right:auto !important;
  height:auto !important; /* высота ровно по контенту */
}

/* ==== Современные улучшения ==== */
.modal{
  backdrop-filter: blur(12px) saturate(180%);
  transition: transform .35s ease, opacity .35s ease;
}
.modal-overlay.show .modal{transform:scale(1);opacity:1;}
.modal{transform:scale(.92);opacity:0;}

/* ==== Декор контента модального окна ==== */
.modal h2{
  font-size:1.5rem;
  font-weight:600;
  color:#0f172a;
  display:flex;
  align-items:center;
  gap:.5rem;
}
.modal h2::before{
  content:'\2709'; /* иконка конверта */
  font-size:1.25rem;
}
.modal-body p{
  font-size:1rem;
  color:#475569;
  line-height:1.55;
  animation:fadeSlide .45s ease-out forwards;
}
.modal-body strong{color:#0ea5e9;}
@keyframes fadeSlide{
  from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);}
}
.modal-footer{
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.modal-footer .auth-button{
  background:linear-gradient(135deg,#0ea5e9 0%, #2563eb 100%);
  transition:transform .2s ease, box-shadow .2s ease;
}
.modal-footer .auth-button:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 14px rgba(14,165,233,.35);
}
#resend-status{font-size:.875rem;}

/* ===================== Стили для предупреждения о подтверждении email ===================== */
.email-warning {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #92400e;
  transition: all 0.2s ease;
}

.email-warning:hover {
  background-color: #fde68a;
  border-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.email-warning svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: #d97706;
}

.email-warning strong {
  color: #78350f;
  font-weight: 600;
}

.email-warning ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  line-height: 1.4;
}

.email-warning li {
  margin-bottom: 0.25rem;
}

/* Анимация появления предупреждения */
.email-warning {
  animation: slideInWarning 0.3s ease-out;
}

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

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .email-warning {
    font-size: 0.8rem;
    padding: 0.625rem;
  }
  
  .email-warning ul {
    padding-left: 1rem;
  }
}

/* ===================== Стили для ошибок черного списка ===================== */
.notification-error.blacklist-error {
  background-color: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}

.notification-error.blacklist-error .notification-icon svg {
  color: #dc2626;
}

.notification-error.blacklist-error .notification-text {
  color: #991b1b;
}

.notification-error.blacklist-error .feedback-link {
  color: #dc2626;
  text-decoration: underline;
  font-weight: 600;
}

.notification-error.blacklist-error .feedback-link:hover {
  color: #b91c1c;
  text-decoration: none;
} 