/* ===== OVERLAY ===== */
.volunteer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

/* Active state */
.volunteer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* ===== MODAL ===== */
.volunteer-modal {
  width: 973px;
  max-width: 98%;
  height: 635px;
  max-height: 95vh;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: row;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

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

/* ===== LEFT: IMAGE ===== */
.volunteer-modal-img {
  width: 440px;
  flex-shrink: 0;
  height: 100%;
}

.volunteer-modal-img-placeholder {
  width: 100%;
  height: 100%;
  background-color: #b5c9b7;
}

.volunteer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== RIGHT: FORM PANEL ===== */
.volunteer-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ===== HEADER ===== */
.volunteer-modal-header {
  background-color: #f9f9f9;
  padding: 24px 24px 16px 24px; /* 24px three sides, 16px bottom */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.volunteer-modal-title {
  font-size: 24px;
  line-height: 125%;
  font-weight: 700;
  color: #181c20;
  margin: 0;
}

/* Close Button */
.volunteer-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.volunteer-close-btn:hover {
  background-color: #e8e8e8;
}

/* ===== FORM BODY (scrollable) ===== */
.volunteer-form-body {
  flex: 1;
  overflow-y: auto; /* Scroll only the form */
  background-color: #ffffff;
  padding: 24px;
}

/* Custom scrollbar */
.volunteer-form-body::-webkit-scrollbar {
  width: 4px;
}

.volunteer-form-body::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.volunteer-form-body::-webkit-scrollbar-thumb {
  background-color: #c5ddc9;
  border-radius: 4px;
}

/* ===== FORM ===== */
.volunteer-form {
  display: flex;
  flex-direction: column;
  gap: 16px; /* 16px between form groups */
}

/* ===== FORM ROW (two fields side by side) ===== */
.volunteer-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== FORM GROUP ===== */
.volunteer-form-group {
  display: flex;
  flex-direction: column;
}

/* ===== LABEL ===== */
.volunteer-label {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 100%;
  color: #878787;
  margin-bottom: 4px;
  display: block;
}

/* ===== INPUT ===== */
.volunteer-input {
  height: 48px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 100%;
  color: #181c20;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  width: 100%;
}

/* Placeholder color */
.volunteer-input::placeholder {
  color: #878787;
}

/* Focus state */
.volunteer-input:focus {
  border-color: #006e25;
  box-shadow: 0 0 0 3px rgba(0, 110, 37, 0.1);
}

/* Error state */
.volunteer-input.is-invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Valid state */
.volunteer-input.is-valid {
  border-color: #006e25;
}

/* ===== SELECT WRAPPER ===== */
.volunteer-select-wrapper {
  position: relative;
}

.volunteer-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px; /* Room for arrow */
}

/* Placeholder option color */
.volunteer-select option[value=""] {
  color: #878787;
}

.volunteer-select option {
  color: #181c20;
}

/* Arrow icon */
.volunteer-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ===== ERROR MESSAGE ===== */
.volunteer-error {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 100%;
  color: #e74c3c;
  margin-top: 4px;
  display: none;
  min-height: 16px;
}

.volunteer-error.show {
  display: block;
}

/* ===== SUBMIT BUTTON ===== */
.volunteer-submit-btn {
  width: 100%;
  padding: 18px 0;
  background: linear-gradient(135deg, #007016 0%, #00aa34 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  font-family: "Inter", sans-serif;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 32px;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.volunteer-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.volunteer-submit-btn:active {
  transform: translateY(0);
}

/* Disabled state before form is valid */
.volunteer-submit-btn:disabled {
  background: #e5e5e5;
  color: #878787;
  cursor: not-allowed;
  transform: none;
  opacity: 1;
}

/* ===========================
   STATUS SCREENS — shared
   =========================== */
.vol-status-screen {
  display: none; /* Hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  flex: 1;
  overflow-y: auto;
  background-color: #ffffff;
}

/* Show when active */
.vol-status-screen.is-active {
  display: flex;
}

/* ===== ICON PILL ===== */
.vol-status-icon-wrapper {
  width: 130px;
  border-radius: 100px; /* Pill shape matching design */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 15px 0;
}

.vol-status-icon-success {
  background-color: #ebf3ee;
}

.vol-status-icon-error {
  background-color: #fef0ee;
}

/* ===== TITLE ===== */
.vol-status-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 125%;
  color: #181c20;
  margin: 16px 0;
}

/* ===== DESCRIPTION ===== */
.vol-status-desc {
  font-size: 15px;
  line-height: 150%;
  color: #3e4a3c;
  margin: 0 0 16px 0;
}

/* ===== INFO BOX (success only) ===== */
.vol-status-info-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 32px;
  text-align: left;
}

.vol-status-info-success {
  background-color: #ebf3ee;
}

.vol-status-info-text {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 100%;
  color: #006e25;
}

/* ===== PRIMARY BUTTON ===== */
.vol-status-btn-primary {
  display: block;
  width: 100%;
  padding: 18px 0;
  background: linear-gradient(135deg, #007016 0%, #00aa34 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.vol-status-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #ffffff;
}

/* ===== RESPONSIVE ===== */

/* Hide image on smaller screens */
@media (max-width: 768px) {
  .volunteer-modal-img {
    display: none; /* Hide image on mobile */
  }

  .volunteer-modal {
    width: 100%;
    height: auto;
    max-height: 95vh;
    border-radius: 16px;
  }

  /* Center heading on mobile */
  .volunteer-modal-header {
    justify-content: center;
    position: relative;
    padding: 20px 24px 14px 24px;
  }

  .volunteer-close-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
  }

  .volunteer-form-row {
    grid-template-columns: 1fr; /* Stack two-col fields on mobile */
  }

  .volunteer-form-body {
    padding: 16px;
  }

  .vol-status-screen {
    padding: 40px 24px;
  }

  .vol-status-icon-wrapper {
    width: 160px;
    height: 80px;
  }

  .vol-status-title {
    font-size: 20px;
  }

  .vol-status-desc {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .volunteer-modal-header {
    padding: 16px 16px 12px 16px;
  }

  .volunteer-modal-title {
    font-size: 20px;
  }

  .volunteer-input {
    font-size: 14px;
  }

  .vol-status-screen {
    padding: 32px 16px;
  }

  .vol-status-title {
    font-size: 18px;
  }
}
