/* container width */
[data-form-key] {
  max-width: 700px;
  margin: 0 auto 20px auto;
}

/* hide popup-only inline containers */
[data-form-key][data-popup-only="true"] {
  display: none;
}

/* main wrapper */
.sf-wrap {
  padding: 24px 0;
  padding-top: 0;
}

/* title */
.sf-title {
  margin: 0 0 20px 0;
  font-size: 26px;
  line-height: 1.3;
}

/* optional content blocks */
.sf-content-blocks {
  margin-bottom: 18px;
}

.sf-content-heading {
  margin: 0 0 10px 0;
  font-size: 22px;
  line-height: 1.3;
  color: #111827;
  font-weight: 700;
}

.sf-content-description,
.sf-content-text,
.sf-content-note {
  margin: 0 0 12px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
}

.sf-content-note {
  background: #f8fafc;
  border-left: 4px solid #22577a;
  padding: 10px 14px;
  border-radius: 6px;
}

/* fields */
.sf-field {
  margin-bottom: 16px;
}

.sf-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #111827;
}

.sf-required {
  color: #c62828;
}

/* inputs */
.sf-field input,
.sf-field select,
.sf-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  background: #ffffff;
  color: #111827;
}

/* remove default browser glow */
.sf-field input:focus,
.sf-field select:focus,
.sf-field textarea:focus {
  outline: none;
  border-color: #22577a;
  box-shadow: none;
  background-color: #ffffff;
}

/* textarea */
.sf-field textarea {
  min-height: 120px;
  resize: vertical;
}

/* button */
.sf-btn {
  background: #000000;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  font-size: 15px;
  cursor: pointer;
}

.sf-btn:hover {
  opacity: 0.95;
}

.sf-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* message box */
.sf-message-box {
  margin-bottom: 16px;
}

/* success */
.sf-success-box {
  background: #e8f5e9;
  border: 1px solid #81c784;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 14px;
  color: #1b5e20;
}

/* error */
.sf-error-box {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 14px;
  color: #b71c1c;
}

.sf-error-list {
  margin: 10px 0 0 18px;
  padding: 0;
}

.sf-error-list li {
  margin: 4px 0;
}

/* popup */
.sf-popup-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.sf-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.sf-popup-dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: sfPopupFadeUp 0.25s ease;
  overflow: hidden;
}

.sf-popup-body {
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  -webkit-overflow-scrolling: touch;
}

@keyframes sfPopupFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sf-popup-header {
  margin-bottom: 18px;
  padding-right: 56px;
}

.sf-popup-header h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  color: #111827;
}

.sf-popup-header p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.5;
}

.sf-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
}

.sf-popup-close:hover {
  background: #e5e7eb;
}

body.sf-popup-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .sf-popup-dialog {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 14px;
  }

  .sf-popup-body {
    padding: 18px;
  }

  .sf-popup-header h3 {
    font-size: 24px;
  }
}