/*--------------------------------------------------------------
  Register Popup
----------------------------------------------------------------*/
.tm_popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.tm_popup.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.tm_popup_overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 6, 24, 0.72);
  backdrop-filter: blur(4px);
}
.tm_popup_box {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.tm_popup.active .tm_popup_box {
  transform: none;
}
.tm_popup_close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f1f1fb;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.tm_popup_close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  margin: -1px 0 0 -8px;
  border-radius: 2px;
  background: var(--tm-navy, #000662);
  transition: background-color 0.3s ease;
}
.tm_popup_close span:first-child { transform: rotate(45deg); }
.tm_popup_close span:last-child { transform: rotate(-45deg); }
.tm_popup_close:hover {
  background: var(--tm-violet, #7476FF);
  transform: rotate(90deg);
}
.tm_popup_close:hover span { background: #fff; }

.tm_popup_grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 30px;
  align-items: stretch;
}
.tm_popup_visual {
  position: relative;
  min-height: 440px;
  border-radius: 16px;
  overflow: hidden;
}
.tm_popup_visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tm_popup_card {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 22px 60px 22px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
}
.tm_popup_card h3 {
  font-family: var(--tm-font);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
}
.tm_popup_card p {
  font-family: var(--tm-font);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}
.tm_popup_card_icon {
  position: absolute;
  top: 22px;
  right: 18px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--tm-violet, #7476FF);
  color: #fff;
}
.tm_popup_card_icon svg { width: 11px; height: 11px; }

.tm_popup_form_wrap {
  padding: 16px 14px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tm_popup_title {
  font-family: var(--tm-font);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--tm-navy, #000662);
  margin: 0 0 8px;
  padding-right: 20px;
}
.tm_popup_sub {
  font-family: var(--tm-font);
  font-size: 13px;
  line-height: 1.6;
  color: #60616C;
  margin: 0 0 22px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--tm-font);
  font-size: 14px;
  color: var(--tm-dark, #0b0a1a);
  background: #fff;
  border: 1px solid #e4e5f0;
  border-radius: 8px;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.contact-form textarea { resize: none; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #a0a1ae; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--tm-violet, #7476FF);
  box-shadow: 0 0 0 3px rgba(116, 118, 255, 0.15);
}
.contact-form select {
  padding: 15px 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2360616C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.contact-form select option { color: #14132e; }
.contact-form .cf_phone {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
}
.tm_popup_submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--tm-font);
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: var(--tm-violet, #7476FF);
  border: 0;
  border-radius: 8px;
  padding: 15px 20px;
  cursor: pointer;
}

body.tm_popup_open { overflow: hidden; }

@media (max-width: 991px) {
  .tm_popup_box { max-width: 520px; }
  .tm_popup_grid { grid-template-columns: 1fr; gap: 20px; }
  .tm_popup_visual { min-height: 240px; }
  .tm_popup_form_wrap { padding: 0 6px 6px; }
  .tm_popup_title { font-size: 22px; }
}
@media (max-width: 575px) {
  .tm_popup { padding: 12px; }
  .tm_popup_box { padding: 12px; border-radius: 16px; }
  .tm_popup_visual { min-height: 200px; }
  .tm_popup_card { padding: 16px 50px 16px 16px; }
  .tm_popup_card h3 { font-size: 17px; }
  .tm_popup_card p { font-size: 12.5px; }
  .contact-form .cf_phone { grid-template-columns: 95px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tm_popup, .tm_popup_box, .tm_popup_close { transition: none; }
}
