/* =====================================
   ✅ BASE RESET + FONT
===================================== */
form#posh-advocate-form {
  font-family: Poppins, sans-serif;
  max-width: 640px;
  margin: 2em auto;
  padding: 2rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

/* =====================================
   ✅ FORM LABELS
===================================== */
form#posh-advocate-form label {
  display: block;
  margin-bottom: 1em;
  font-weight: 600;
  font-size: 0.95rem;
  color: #222;
}

/* =====================================
   ✅ INPUTS & SELECTS
===================================== */
form#posh-advocate-form input,
form#posh-advocate-form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: Poppins, sans-serif;
  box-sizing: border-box;
}

/* =====================================
   ✅ CHECKBOX INLINE FIX
===================================== */
form#posh-advocate-form label.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 1.5em;
  color: #222;
  flex-wrap: wrap;
  line-height: 1.5;
}

form#posh-advocate-form label.checkbox-inline input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

form#posh-advocate-form label.checkbox-inline button.modal-trigger {
  display: inline;
  padding: 0;
  margin: 0 3px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}

/* =====================================
   ✅ FIELD WRAPPERS
===================================== */
.form-section {
  margin-bottom: 2rem;
}

.section-gap {
  margin-bottom: 2rem;
}

/* =====================================
   ✅ ERROR + SUCCESS MESSAGES
===================================== */
.posh-error {
  background: #ffe6e6;
  color: #B00020;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #B00020;
  border-radius: 8px;
  font-weight: 500;
}

.posh-success {
  background: #e6ffe9;
  color: #2d7a4d;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #2d7a4d;
  border-radius: 8px;
  font-weight: 500;
}

/* =====================================
   ✅ INLINE FIELD ERRORS
===================================== */
.field-error {
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 4px;
  color: #B00020;
}

/* =====================================
   ✅ FIELD PREVIEW TEXT
===================================== */
.field-preview {
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 4px;
  color: #555;
}

/* =====================================
   ✅ SPONSOR TABLE
===================================== */
table.posh-sponsor-preview {
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  width: 100%;
  background: #f9f9f9;
  border-radius: 6px;
  overflow: hidden;
}

.posh-sponsor-preview th {
  text-align: left;
  color: #444;
  font-weight: 600;
  padding: 6px 8px;
  background: #eee;
}

.posh-sponsor-preview td {
  padding: 6px 8px;
  border-top: 1px solid #ddd;
}

/* =====================================
   ✅ SUBMIT BUTTON
===================================== */
form#posh-advocate-form button[type="submit"] {
  background-color: #E0457B;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 1rem;
  font-family: Poppins, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-block;
  margin-top: 1.5rem;
}

form#posh-advocate-form button[type="submit"]:hover {
  background-color: #c73869;
}

/* =====================================
   ✅ PDF EMBED CONTAINER
===================================== */
.posh-modal-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

.posh-modal-wrapper {
  background: #fff;
  padding: 1rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
  font-family: Poppins, sans-serif;
  color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* =====================================
   ✅ PDF VIEWER CONTENT
===================================== */
.posh-pdf-viewer {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.posh-pdf-viewer h3 {
  color: #E0457B;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.posh-pdf-viewer p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.posh-pdf-button {
  display: inline-block;
  background-color: #E0457B;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin: 1rem 0;
  transition: background-color 0.2s ease;
  min-height: 44px; /* iOS touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.posh-pdf-button:hover {
  background-color: #c73869;
  color: white;
  text-decoration: none;
}

.posh-pdf-note {
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
  margin-top: 1rem;
}

/* Mobile-specific modal improvements */
@media (max-width: 768px) {
  .posh-modal-wrapper {
    max-width: 95vw; /* Use more screen width on mobile */
    max-height: 95vh; /* Use more screen height on mobile */
    padding: 0.5rem; /* Reduce padding on mobile */
  }
  
  .posh-pdf-viewer {
    padding: 1rem;
  }
  
  .posh-pdf-viewer h3 {
    font-size: 1.3rem;
  }
  
  .posh-pdf-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
  }
  
  .posh-modal-overlay {
    padding: 0.5rem; /* Reduce padding on mobile */
  }
}

/* =====================================
   ✅ MODAL TRIGGER BUTTON
===================================== */
button.modal-trigger {
  background: none;
  border: none;
  color: #E0457B;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: Poppins, sans-serif;
  /* Mobile touch improvements */
  min-height: 44px; /* iOS recommended touch target size */
  min-width: 44px;
  display: inline-block;
  -webkit-tap-highlight-color: transparent; /* Remove iOS tap highlight */
  touch-action: manipulation; /* Optimize touch response */
}

button.modal-trigger:hover {
  text-decoration: none;
}

/* Mobile-specific modal trigger styles */
@media (max-width: 768px) {
  button.modal-trigger {
    font-size: 1rem; /* Slightly larger on mobile */
    padding: 4px 8px; /* Add padding for better touch target */
    margin: 2px 0; /* Add vertical spacing */
  }
}

/* =====================================
   ✅ MODAL CLOSE BUTTON
===================================== */
button.posh-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  font-weight: bold;
  color: #E0457B;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
  /* Mobile touch improvements */
  min-height: 44px; /* iOS recommended touch target size */
  min-width: 44px;
  padding: 8px;
  -webkit-tap-highlight-color: transparent; /* Remove iOS tap highlight */
  touch-action: manipulation; /* Optimize touch response */
}

/* Mobile-specific close button styles */
@media (max-width: 768px) {
  button.posh-modal-close {
    font-size: 32px; /* Larger on mobile */
    top: 8px;
    right: 12px;
    padding: 12px; /* More padding for easier tapping */
  }
}