/* =============================================================================
 * ad_consult_modal.css — 메뉴잇 광고 문의 모달
 * Figma: 751:4049 (mobile bottom sheet) + PC centered dialog
 * ============================================================================= */

html.modal-open,
body.modal-open {
  overflow: hidden;
}

.modal.modal--ad {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.modal--ad.show-modal {
  opacity: 1;
  visibility: visible;
}

.modal--ad .modal--ad__content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  margin: 0;
  padding: 40px 40px 32px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.25),
    0 10px 25px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  overflow: hidden;
}

.modal--ad__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.modal--ad__close img {
  display: block;
  width: 24px;
  height: 24px;
}

.modal--ad__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal--ad__scroll::-webkit-scrollbar {
  display: none;
}

.modal--ad__title {
  flex-shrink: 0;
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.7px;
  color: #222222;
}

.modal--ad__intro {
  margin: 0 0 24px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.4px;
  color: #3a3a3a;
}

.modal--ad__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0 0 8px;
}

.modal--ad__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal--ad__label {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.4px;
  color: #222222;
}

.modal--ad__label em {
  color: #e8442a;
  font-style: normal;
}

.modal--ad__label .optional {
  color: #666666;
  font-weight: 400;
}

.modal--ad__input,
.modal--ad__textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  background: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.4px;
  color: #222222;
  outline: none;
}

.modal--ad__input {
  height: 52px;
  padding: 0 16px;
}

.modal--ad__textarea {
  min-height: 120px;
  padding: 16px;
  resize: none;
  font-weight: 400;
}

.modal--ad__input::placeholder,
.modal--ad__textarea::placeholder {
  color: #666666;
  font-weight: 400;
}

.modal--ad__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.modal--ad__consent {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.35px;
  color: #3a3a3a;
}

.modal--ad__submit {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 12px;
  background: #ff4c30;
  color: #ffffff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.45px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal--ad__submit:hover:not(:disabled) {
  background: #e8442a;
}

.modal--ad__submit:disabled {
  background: #ffa496;
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .modal.modal--ad {
    align-items: flex-end;
    padding: 0;
    padding-bottom: var(--modal-ad-vv-bottom-offset, 0);
  }

  .modal--ad .modal--ad__content {
    width: 100%;
    max-width: 100%;
    max-height: 80dvh;
    min-height: 0;
    padding: 52px 16px 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.11);
  }

  .modal--ad__title {
    margin-bottom: 8px;
    font-size: 24px;
    letter-spacing: -0.6px;
  }

  .modal--ad__intro {
    margin-bottom: 16px;
    font-size: 15px;
    letter-spacing: -0.375px;
  }

  .modal--ad__footer {
    gap: 8px;
    margin: 0 -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    width: calc(100% + 32px);
    border-top: none;
    background: #ffffff;
    box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.06);
  }

  .modal--ad__submit {
    height: 56px;
    font-size: 17px;
    letter-spacing: -0.425px;
  }
}
