/* =============================================
   volunteer-modal.css
   Volunteer registration modal — ACD theme
   Place this file in: public/css/volunteer-modal.css
   ============================================= */

/* ── Modal Backdrop ── */
#volunteerModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
#volunteerModal.open { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal Box ── */
.vm-box {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.vm-box::-webkit-scrollbar { width: 5px; }
.vm-box::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

@keyframes slideUp {
  from { transform: translateY(40px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ── Rainbow Bar ── */
.vm-rainbow {
  height: 5px;
  background: linear-gradient(90deg, #2B8FBF, #3BAD8A, #7B4CA0, #C94F3A, #E8892A);
  border-radius: 24px 24px 0 0;
}

/* ── Header ── */
.vm-header {
  padding: 28px 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.vm-header-text .vm-tag {
  display: inline-block;
  background: rgba(43, 143, 191, 0.1);
  color: #2B8FBF;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 40px;
  margin-bottom: 10px;
}
.vm-header-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}
.vm-header-text p {
  font-size: 13px;
  color: #888;
  margin-top: 6px;
  line-height: 1.6;
}
.vm-close {
  background: #f0f2f5;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
}
.vm-close:hover { background: #C94F3A; color: #fff; }

/* ── Form Body ── */
.vm-form {
  padding: 28px 36px 36px;
}

/* Two-column grid for small fields */
.vm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Field */
.vm-field {
  margin-bottom: 18px;
}
.vm-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 7px;
}
.vm-field label .req { color: #C94F3A; margin-left: 2px; }

.vm-field input,
.vm-field select,
.vm-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e4e4e4;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #1a1a2e;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vm-field input:focus,
.vm-field select:focus,
.vm-field textarea:focus {
  border-color: #2B8FBF;
  box-shadow: 0 0 0 3px rgba(43, 143, 191, 0.1);
  background: #fff;
}
.vm-field input.error,
.vm-field select.error,
.vm-field textarea.error {
  border-color: #C94F3A;
  box-shadow: 0 0 0 3px rgba(201, 79, 58, 0.1);
}
.vm-field textarea { resize: vertical; min-height: 100px; }

/* Char counter */
.vm-char-count { font-size: 11px; color: #aaa; text-align: right; margin-top: 4px; }

/* ── Skills Multi-Select Tags ── */
.vm-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid #e4e4e4;
  border-radius: 10px;
  background: #fafafa;
  min-height: 52px;
  cursor: text;
  transition: border-color 0.2s;
}
.vm-skills-grid.focus-ring { border-color: #2B8FBF; box-shadow: 0 0 0 3px rgba(43,143,191,0.1); }
.vm-skills-grid.error { border-color: #C94F3A; }

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: #555;
  transition: all 0.15s;
  user-select: none;
}
.skill-chip:hover { border-color: #2B8FBF; color: #2B8FBF; }
.skill-chip.selected {
  background: linear-gradient(135deg, rgba(43,143,191,0.12), rgba(59,173,138,0.12));
  border-color: #2B8FBF;
  color: #2B8FBF;
}
.skill-chip.selected::before { content: '✓ '; font-size: 11px; }

/* ── Photo Upload ── */
.vm-photo-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed #d0d0d0;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}
.vm-photo-label:hover { border-color: #2B8FBF; background: rgba(43,143,191,0.04); }
.vm-photo-label .photo-icon { font-size: 28px; }
.vm-photo-label .photo-text { font-size: 13px; color: #666; }
.vm-photo-label .photo-hint { font-size: 11px; color: #aaa; }
#photoPreview {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2B8FBF;
  display: none;
  margin: 0 auto 8px;
}
#profilePhoto { display: none; }

/* ── Error message under field ── */
.vm-error-msg { font-size: 12px; color: #C94F3A; margin-top: 5px; display: none; }
.vm-error-msg.show { display: block; }

/* ── Submit button ── */
.vm-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #2B8FBF, #7B4CA0);
  color: #fff;
  padding: 15px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}
.vm-submit-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.vm-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Loading spinner inside button */
.vm-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alert banners ── */
.vm-alert {
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.vm-alert.show { display: flex; align-items: flex-start; gap: 10px; }
.vm-alert.success {
  background: rgba(59, 173, 138, 0.1);
  border: 1px solid rgba(59, 173, 138, 0.3);
  color: #2a9070;
}
.vm-alert.error-alert {
  background: rgba(201, 79, 58, 0.1);
  border: 1px solid rgba(201, 79, 58, 0.3);
  color: #C94F3A;
}

/* ── Progress dots ── */
.vm-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 36px 20px;
}
.vm-progress .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #e0e0e0;
  transition: background 0.3s, transform 0.3s;
}
.vm-progress .dot.active { background: #2B8FBF; transform: scale(1.3); }
.vm-progress .dot.done   { background: #3BAD8A; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .vm-box { border-radius: 20px 20px 0 0; max-height: 95vh; }
  #volunteerModal { align-items: flex-end; padding: 0; }
  .vm-header { padding: 24px 20px 0; }
  .vm-form { padding: 20px 20px 28px; }
  .vm-grid-2 { grid-template-columns: 1fr; }
  .vm-header-text h2 { font-size: 22px; }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
}
