/* Grievance Form Page Styles */

.grievance-container {
  max-width: auto;
  margin: 40px auto;
  padding: 0 20px;
}

.grievance-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  padding: 40px;
}

.grievance-title {
  font-size: 28px;
  font-weight: 700;
  color: #1e8756;
  margin-bottom: 10px;
}

.grievance-intro {
  color: #4b5563;
  margin-bottom: 30px;
  line-height: 1.6;
  text-align: center;
}

.form-group { margin-bottom: 24px; }

.form-label {
  display: block;
  font-weight: 600;
  color: #212121;
  margin-bottom: 8px;
  font-size: 14px;
}
.form-label .required { color: #dc2626; margin-left: 4px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #1e8756;
}

.form-textarea { min-height: 120px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-help-text { font-size: 13px; color: #6b7280; margin-top: 6px; }

.phone-input-wrapper {
  display: flex;
  align-items: stretch;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.phone-input-wrapper:focus-within { border-color: #1e8756; }
.phone-prefix {
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 14px;
  border-right: 2px solid #e5e7eb;
  white-space: nowrap;
  user-select: none;
}
.phone-input-wrapper .phone-input {
  border: none;
  border-radius: 0;
  flex: 1;
}
.phone-input-wrapper .phone-input:focus { border-color: transparent; }

.form-checkbox-group { display: flex; align-items: center; gap: 10px; }
.form-checkbox { width: 20px; height: 20px; cursor: pointer; }

.form-file-input {
  padding: 10px;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
}

.form-submit-btn {
  background: linear-gradient(135deg, #1e8756 0%, #2d6a4f 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(30, 135, 86, 0.3);
}
.form-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 135, 86, 0.4);
}
.form-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.success-message {
  background: #d1fae5;
  border: 2px solid #10b981;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  color: #065f46;
}

.error-message {
  background: #fee2e2;
  border: 2px solid #dc2626;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  color: #991b1b;
}

.field-error { color: #dc2626; font-size: 13px; margin-top: 6px; }

.form-label .optional { color: #6b7280; font-weight: 400; font-size: 12px; margin-left: 4px; }

/* ── Grievance ID box (shown after successful submission) ── */
.grievance-id-box {
  margin-top: 20px;
  background: #fff;
  border: 2px solid #1e8756;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
}
.grievance-id-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.grievance-id-value {
  font-size: 18px;
  font-weight: 700;
  color: #1e8756;
  font-family: monospace;
  letter-spacing: 0.04em;
  word-break: break-all;
  margin-bottom: 10px;
}
.grievance-id-note {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* ── Accordion results ── */
.gs-accordion-header {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin: 28px 0 12px;
}
.gs-accordion { display: flex; flex-direction: column; gap: 8px; }
.gs-acc-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.gs-acc-item--open { border-color: #1e8756; }
.gs-acc-trigger {
  width: 100%;
  background: #f9fafb;
  border: none;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  transition: background 0.15s;
}
.gs-acc-item--open .gs-acc-trigger,
.gs-acc-trigger:hover { background: #f0fdf4; }
.gs-acc-trigger-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.gs-acc-trigger-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.gs-acc-type { font-weight: 700; font-size: 14px; color: #111827; }
.gs-acc-date { font-size: 13px; color: #6b7280; }
.gs-acc-chevron {
  font-size: 20px;
  color: #6b7280;
  transition: transform 0.2s;
  line-height: 1;
  display: inline-block;
}
.gs-acc-item--open .gs-acc-chevron { transform: rotate(180deg); }
.gs-acc-body {
  display: none;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
}
.gs-acc-item--open .gs-acc-body { display: block; }

/* ── Status page: summary card ── */
.gs-result { margin-top: 32px; }

.gs-summary-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}
.gs-summary-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  gap: 16px;
}
.gs-summary-row:last-child { border-bottom: none; }
.gs-summary-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  min-width: 130px;
}
.gs-summary-value {
  font-size: 15px;
  color: #111827;
}
.gs-id {
  font-family: monospace;
  font-size: 13px;
  color: #1e8756;
  word-break: break-all;
}

/* ── Status badge ── */
.gs-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.gs-status-pending   { background: #fef3c7; color: #92400e; }
.gs-status-in_progress { background: #dbeafe; color: #1e40af; }
.gs-status-resolved  { background: #d1fae5; color: #065f46; }
.gs-status-closed    { background: #f3f4f6; color: #374151; }

/* ── Status timeline ── */
.gs-timeline-section { margin-top: 8px; }
.gs-timeline-heading {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
}
.gs-timeline {
  position: relative;
  padding-left: 28px;
}
.gs-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.gs-timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.gs-timeline-item:last-child { margin-bottom: 0; }
.gs-timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d1d5db;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #d1d5db;
}
.gs-timeline-item--latest .gs-timeline-dot {
  background: #1e8756;
  box-shadow: 0 0 0 2px #1e8756;
}
.gs-timeline-content {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
}
.gs-tl-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.gs-tl-datetime {
  font-size: 12px;
  color: #9ca3af;
  margin-left: auto;
}
.gs-tl-comment {
  font-size: 14px;
  color: #374151;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grievance-card { padding: 24px; }
  .gs-summary-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .gs-summary-label { min-width: unset; }
}
