/* static/css/modals.css - стили для модальных окон */

.modals_tg_perehod {
  font-weight: 600;
  opacity: 0.8;
}
@media (max-width: 500px) {
  .modals_tg_perehod {
    font-size: 13px;
  }
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.modal_con_rg,
.modal-confirm {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(17 17 17 / 90%);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 10px;
  box-sizing: border-box;
}

.modal_card {
  background: linear-gradient(145deg, #373737, #1e1e1e5e);
  border-radius: 30px;
  width: 100%;
  max-width: 480px;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(90deg, #2d0b8b55, #12a08e30);
}

.modal_header h2 {
  font-size: 22px;
  font-weight: 600;
  color: rgb(202 165 255 / 90%);
  margin: 0;
}

.modal_close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgb(255 255 255 / 7%);
  border: none;
  color: #aaa;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal_close:hover {
  background: #ff4757;
  color: white;
  transform: rotate(90deg);
}

.modal_body {
  opacity: 0.9;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100% !important;
}
.input-group {
  margin-bottom: 20px;
  width: 100%;
}
.input-group:last-of-type {
  margin-bottom: 28px;
}

.login-input {
  width: 91%;
  padding: 15px 20px;
  border-radius: 20px;
  background: #1e1e1ec2;
  border: 1px solid #3f3f3f9a;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  box-sizing: border-box;
  margin-left: 20px;
}

.login-input:focus {
  outline: none;
  border-color: #7a4ef3;
  background: #252525;
}

.login-input::placeholder {
  color: #666;
}

.btn_primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 550;
  cursor: pointer;
  border: none;
  width: 90%;
  background: linear-gradient(135deg, #7a4ef3, #5a2ae0);
  color: rgba(255, 255, 255, 0.909);
  position: relative;
  overflow: hidden;
}

.btn_primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.183),
    transparent
  );
  transition: left 0.5s ease;
}

.btn_primary:hover {
  transform: translateY(-2px);
}
.btn_primary:hover::before {
  left: 100%;
}
.btn_primary:active {
  transform: translateY(0);
}

.modal-link {
  margin-top: 10px;
  text-align: center;
  font-size: 15px;
  color: #8d8d8d;
  font-weight: 600;
}
.modal-link a {
  color: #7a4ef3;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: color 0.3s;
}
.modal-link a:hover {
  color: #9f7aff;
  text-decoration: underline;
}

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

.modal-confirm-content {
  background: #2a2a2a;
  border-radius: 30px;
  max-width: 400px;
  width: 90%;
  padding: 32px;
  border: 1px solid #444;
  animation: modalSlideUp 0.3s ease;
}

.modal-confirm-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.modal-confirm-header h2 {
  color: #ffa726;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}
.modal-confirm-content p {
  text-align: center;
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.6;
  color: #e0e0e0;
}
.modal-confirm-buttons {
  display: flex;
  gap: 15px;
}
.modal-confirm-buttons button {
  flex: 1;
  padding: 12px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}
.cancel-btn {
  background: #3a3a3a;
  color: white;
}
.cancel-btn:hover {
  background: #4a4a4a;
}
.confirm-btn {
  background: #ff6b6b;
  color: white;
}
.confirm-btn:hover {
  background: #ff5252;
  transform: translateY(-2px);
}

.modal-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  animation: slideUp 0.3s ease;
}

.toast-content {
  background: #2a2a2aea;
  font-weight: 500;
  border-radius: 30px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  font-size: 18px;
  font-weight: bold;
}
.toast-message {
  font-size: 14px;
  color: white;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.modal_con_rg .modal_card .modal_header .modal_close {
  position: relative !important;
  transform: none !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
}

/* ===== СТИЛИ ДЛЯ ВЫЕЗЖАЮЩИХ ИКОНОК (ТОЛЬКО В РЕГИСТРАЦИИ) ===== */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.auth-item {
  display: flex;
  align-items: center;
  gap: 0px;
}

.auth-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  opacity: 0.9;
}

.telegram-icon {
  background: #5392d0;
}

.vk-icon {
  background: #1e5dd8;
}

.auth-icon-btn.active {
  opacity: 1;
  transform: scale(1.2);
}

.auth-input-wrapper {
  width: 0;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input-wrapper.active {
  width: 180px;
}

.auth-input {
  width: 160px;
  padding: 15px 10px 15px 15px;
  border-radius: 20px;
  background: #1e1e1ec2;
  border: 1px solid #3f3f3f9a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 550;
  margin-left: 10px;
  outline: none;
}

.auth-input:focus {
  border-color: #7a4ef3;
  background: #252525;
}

.auth-input::placeholder {
  color: #666;
  font-size: 12px;
}

/* Адаптация для мобильных */
@media (max-width: 500px) {
  .auth-icon-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .auth-input-wrapper.active {
    width: 150px;
  }
  .auth-input {
    width: 140px;
    font-size: 12px;
    padding: 15px 15px;
  }
  .auth-input::placeholder {
    font-size: 10px;
  }
}

/* Модальное окно обращения */
.modal_ticket {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(16 16 16 / 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal_ticket_content {
  background: #2a2a2a6b;
  border-radius: 40px;
  width: 90%;
  max-width: 500px;
  animation: modalSlideUp 0.3s ease;
}
.modal_ticket_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #3a3a3a;
}
.modal_ticket_header h2 {
  color: #7a4ef3;
  font-size: 25px;
  font-weight: 600;
  margin: 0;
}
.modal_ticket_close {
  background: none;
  border: none;
  font-size: 28px;
  color: #aaa;
  cursor: pointer;
}
.modal_ticket_close:hover {
  color: #ff6b6b;
}
.modal_ticket_body {
  padding: 20px;
}
.modal_ticket_body textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 20px;
  background: #1e1e1e;
  border: 1px solid #444;
  color: white;
  font-size: 15px;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}
.modal_ticket_body textarea:focus {
  outline: none;
  border-color: #7a4ef3;
}
.modal_ticket_buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: flex-end;
}
.modal_ticket_buttons button {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.2s;
}
.cancel_ticket_btn {
  background: #444;
  color: white;
  border: none;
}
.cancel_ticket_btn:hover {
  background: #555;
}
.send_ticket_btn {
  background: linear-gradient(135deg, #7a4ef3, #5a2ae0);
  color: white;
  border: none;
}
.send_ticket_btn:hover {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(122, 78, 243, 0.4);
}

/* ==================== PWA БАННЕР ДЛЯ IPHONE ==================== */

/* Анимация появления */
@keyframes pwaFadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

#pwa-install-banner {
  animation: pwaFadeInUp 0.3s ease;
}

@media (max-width: 480px) {
  #pwa-install-banner {
    bottom: 100px !important;
    padding: 10px 14px !important;
  }
  #pwa-install-banner .material-symbols-outlined {
    font-size: 25px !important;
  }
  #pwa-install-banner div:first-child div:first-child + div div:first-child {
    font-size: 13px !important;
  }
  #pwa-install-banner div:first-child div:first-child + div div:last-child {
    font-size: 10px !important;
  }
}

#pwa-instructions-modal {
  animation: pwaFadeIn 0.3s ease;
}

@keyframes pwaFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
