/* Volunteering page: WhatsApp connect modal (Join Our Team steps) */

.path-explorer-join-team .submission-steps .step .volunteer-wa-open-btn {
  margin-top: auto;
  width: 100%;
}

.help-project-card .volunteer-wa-open-btn {
  margin-top: 1rem;
  width: 100%;
}

/* Find your path: WhatsApp under each tree detail panel */
.tree-detail-wa {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border, rgba(15, 23, 42, 0.12));
}

.tree-detail-wa .volunteer-wa-open-btn {
  width: 100%;
}

[data-theme="dark"] .tree-detail-wa {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.volunteer-wa-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.volunteer-wa-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.volunteer-wa-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-xl, 0 24px 48px rgba(0, 0, 0, 0.18));
  text-align: left;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.volunteer-wa-overlay.is-open .volunteer-wa-modal {
  transform: translateY(0) scale(1);
}

.volunteer-wa-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: var(--color-neutral-100, #f1f5f9);
  color: var(--color-text-muted, #64748b);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volunteer-wa-close:hover {
  background: var(--color-neutral-200, #e2e8f0);
  color: var(--color-text, #1e293b);
}

.volunteer-wa-heading {
  margin: 0 2rem 0.5rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text, #1e293b);
}

.volunteer-wa-topic-label {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary, #2563eb);
}

.volunteer-wa-topic-summary {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--color-text-muted, #64748b);
  padding: 0.65rem 0.75rem;
  background: var(--color-surface-elevated, rgba(0, 0, 0, 0.03));
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
}

.volunteer-wa-form {
  margin-top: 0.25rem;
}

.volunteer-wa-field {
  margin-bottom: 1rem;
}

.volunteer-wa-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text, #334155);
  margin-bottom: 0.35rem;
}

.volunteer-wa-field input,
.volunteer-wa-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border, rgba(15, 23, 42, 0.12));
  border-radius: var(--radius-md, 8px);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-surface-elevated, #fff);
  color: var(--color-text, #1e293b);
}

.volunteer-wa-field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.volunteer-wa-field input:focus,
.volunteer-wa-field textarea:focus {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 2px;
}

.volunteer-wa-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-muted, #64748b);
}

.volunteer-wa-error {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #b91c1c;
}

.volunteer-wa-submit {
  width: 100%;
  margin-top: 0.25rem;
}

[data-theme="dark"] .volunteer-wa-modal {
  background: var(--color-surface, #1e1e1e);
}

[data-theme="dark"] .volunteer-wa-heading {
  color: var(--color-text, rgba(255, 255, 255, 0.92));
}

[data-theme="dark"] .volunteer-wa-topic-summary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(200, 200, 200, 0.9);
}

[data-theme="dark"] .volunteer-wa-field label {
  color: rgba(226, 232, 240, 0.9);
}

[data-theme="dark"] .volunteer-wa-field input,
[data-theme="dark"] .volunteer-wa-field textarea {
  background: #262626;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

[data-theme="dark"] .volunteer-wa-close {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.85);
}

[data-theme="dark"] .volunteer-wa-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

[data-theme="dark"] .volunteer-wa-hint {
  color: rgba(180, 180, 180, 0.9);
}

[data-theme="dark"] .volunteer-wa-error {
  color: #fca5a5;
}
