:root {
  --tod-orange: #f38d22;
  --tod-orange-deep: #d76a14;
  --tod-ink: #182230;
  --tod-muted: #5e6b7d;
  --tod-surface: #ffffff;
  --tod-surface-soft: #f7f4ef;
  --tod-line: rgba(24, 34, 48, 0.12);
  --tod-shadow: 0 30px 70px rgba(7, 15, 28, 0.28);
}

.tod-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 16, 27, 0.68);
  backdrop-filter: blur(8px);
}

.tod-popup-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(88vh, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  background: var(--tod-surface);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--tod-shadow);
}

.tod-popup-cross {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 34, 48, 0.9);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.tod-popup-media {
  position: relative;
  min-height: 100%;
  background: #ead7c1;
}

.tod-popup-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tod-popup-media-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(24, 34, 48, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tod-popup-content {
  min-width: 0;
  overflow: auto;
  padding: 30px 28px 26px;
  background:
    radial-gradient(circle at top right, rgba(243, 141, 34, 0.14), transparent 28%),
    linear-gradient(180deg, #fffdfa, var(--tod-surface-soft));
}

.tod-popup-head {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  padding-top: 4px;
}

.tod-popup-copy {
  min-width: 0;
  max-width: 440px;
  text-align: center;
}

.tod-popup-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(243, 141, 34, 0.14);
  color: var(--tod-orange-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tod-popup-copy h2 {
  margin: 0 0 8px;
  color: var(--tod-ink);
  font-size: 32px;
  line-height: 1.05;
}

.tod-popup-copy p {
  margin: 0;
  color: var(--tod-muted);
  font-size: 14px;
  line-height: 1.65;
}

.tod-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tod-popup-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--tod-ink);
  font-size: 12px;
  font-weight: 700;
}

.tod-popup-form input,
.tod-popup-form select,
.tod-popup-form textarea {
  width: 100%;
  border: 1px solid var(--tod-line);
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 14px;
  color: var(--tod-ink);
  background: rgba(255, 255, 255, 0.96);
}

.tod-popup-form textarea {
  min-height: 110px;
  resize: vertical;
}

.tod-popup-form input:focus,
.tod-popup-form select:focus,
.tod-popup-form textarea:focus {
  outline: none;
  border-color: rgba(243, 141, 34, 0.7);
  box-shadow: 0 0 0 3px rgba(243, 141, 34, 0.16);
}

.tod-form-full {
  grid-column: 1 / -1;
}

.tod-popup-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.tod-submit-btn {
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.tod-submit-btn {
  border: 0;
  background: linear-gradient(135deg, var(--tod-orange), var(--tod-orange-deep));
  color: #fff;
}

.tod-submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.tod-form-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--tod-muted);
  font-size: 12px;
  line-height: 1.5;
}

.tod-form-status.is-success {
  color: #0f766e;
}

.tod-form-status.is-error {
  color: #b91c1c;
}

html.tod-popup-open,
body.tod-popup-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.tod-popup-open {
  position: fixed;
  left: 0;
  width: 100%;
}

@media (max-width: 900px) {
  .tod-popup-dialog {
    width: min(620px, 100%);
    grid-template-columns: 1fr;
  }

  .tod-popup-media {
    display: none;
  }
}

@media (max-width: 640px) {
  .tod-popup-overlay {
    padding: 12px;
  }

  .tod-popup-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .tod-popup-cross {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .tod-popup-content {
    padding: 20px 16px 16px;
  }

  .tod-popup-head {
    margin-bottom: 14px;
  }

  .tod-popup-copy h2 {
    font-size: 24px;
  }

  .tod-popup-copy p {
    font-size: 12px;
    line-height: 1.5;
  }

  .tod-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tod-popup-form label {
    gap: 5px;
    font-size: 11px;
  }

  .tod-popup-form input,
  .tod-popup-form select,
  .tod-popup-form textarea {
    border-radius: 12px;
    padding: 10px 11px;
    font-size: 12px;
  }

  .tod-popup-form textarea {
    min-height: 92px;
  }

  .tod-form-full {
    grid-column: 1 / -1;
  }

  .tod-popup-actions {
    grid-template-columns: 1fr;
  }
}
