.memory-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(16, 16, 23, 0.85);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: none;
  opacity: 0;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.3s ease;
}
.memory-modal-overlay.is-open {
  display: flex;
  opacity: 1;
}
.memory-modal-overlay.is-open .memory-modal-content {
  transform: scale(1);
}

.memory-modal-content {
  background: #F9F9F9;
  width: 100%;
  max-width: 860px;
  border-radius: 4px;
  position: relative;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
@media (max-width: 768px) {
  .memory-modal-content {
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
}

.memory-modal-scroll {
  overflow-y: auto;
  padding: 50px 60px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1;
}
@media (max-width: 768px) {
  .memory-modal-scroll {
    padding: 30px 20px;
  }
}

.modal-top {
  display: flex;
  padding-bottom: 40px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.modal-top .inline-block {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-top .inline-block .modal-title {
  color: #101017;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  font-family: "UAF Memory", serif;
}
.modal-top .inline-block .close-modal-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}
.modal-top .inline-block .close-modal-btn svg {
  width: 32px;
  height: 32px;
}
.modal-top .inline-block .close-modal-btn:hover {
  opacity: 0.6;
}
.modal-top .modal-subtitle {
  color: #101017;
  font-family: "Lato", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
}
.modal-top .star {
  color: #D32F2F;
}

.memory-form-container {
  width: 100%;
}
.memory-form-container p {
  margin: 0;
  padding: 0;
  width: 100%;
}
.memory-form-container .memory-form-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.memory-form-container .form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
}
@media (max-width: 600px) {
  .memory-form-container .form-row-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.memory-form-container .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: flex-start;
}
.memory-form-container .form-group label {
  font-family: "Lato", sans-serif;
  font-size: 14px;
  color: #101017;
  font-weight: 500;
}
.memory-form-container .form-group .hint-text {
  color: rgba(16, 16, 23, 0.5);
  font-family: "Lato", sans-serif;
  font-size: 13px;
  margin-top: -2px;
}
.memory-form-container .wpcf7-form-control-wrap {
  width: 100%;
  display: block;
}
.memory-form-container .wpcf7-form-control.wpcf7-text,
.memory-form-container .wpcf7-form-control.wpcf7-email {
  width: 100% !important;
  height: 48px;
  background: #FFFFFF;
  color: #101017;
  padding: 0 16px;
  border: 1px solid #B5B5B5;
  border-radius: 4px;
  font-size: 15px;
  font-family: "Lato", sans-serif;
  box-sizing: border-box !important;
  transition: all 0.3s ease;
}
.memory-form-container .wpcf7-form-control.wpcf7-text:focus,
.memory-form-container .wpcf7-form-control.wpcf7-email:focus {
  border: 1px solid #B28F23;
  outline: none;
  box-shadow: 0 0 0 1px #B28F23;
}
.memory-form-container .wpcf7-form-control.wpcf7-text::placeholder,
.memory-form-container .wpcf7-form-control.wpcf7-email::placeholder {
  color: rgba(16, 16, 23, 0.5);
}
.memory-form-container .wpcf7-form-control.wpcf7-textarea {
  width: 100% !important;
  background: #FFFFFF;
  color: #101017;
  padding: 16px;
  border: 1px solid #B5B5B5;
  border-radius: 4px;
  font-size: 15px;
  font-family: "Lato", sans-serif;
  box-sizing: border-box !important;
  transition: all 0.3s ease;
  min-height: 160px;
  resize: vertical;
}
.memory-form-container .wpcf7-form-control.wpcf7-textarea:focus {
  border: 1px solid #B28F23;
  outline: none;
  box-shadow: 0 0 0 1px #B28F23;
}
.memory-form-container .wpcf7-form-control.wpcf7-textarea::placeholder {
  color: rgba(16, 16, 23, 0.5);
}
.memory-form-container .wpcf7-not-valid-tip {
  color: #D32F2F;
  font-size: 13px;
  font-family: "Lato", sans-serif;
  margin-top: 4px;
  font-weight: 500;
}
.memory-form-container div.wpcf7-response-output {
  margin: 20px 0 0 0;
  border-radius: 4px;
  border-color: #B28F23;
  font-family: "Lato", sans-serif;
}
.memory-form-container .consent-text {
  color: rgba(16, 16, 23, 0.5);
  font-family: "Lato", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 8px;
  margin-bottom: 8px;
}
.memory-form-container .consent-text p {
  margin: 0;
}
.memory-form-container .submit-memory-btn {
  display: flex;
  width: 100%;
  height: 60px;
  justify-content: center;
  align-items: center;
  background: #B28F23 !important;
  color: #F9F9F9 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  border: none !important;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
  font-family: "Lato", sans-serif;
  letter-spacing: 0.5px;
}
.memory-form-container .submit-memory-btn:hover {
  background: #C4AB5B !important;
}
