/* /public/home/join_us/join_us.css
   SRK Honda – Join Us (Theme matched + fully responsive)
*/

/* ---------- BASE / SAFETY ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* prevent horizontal scroll on mobiles */
}

/* ---------- THEME TOKENS (match home_page.css) ---------- */
:root{
  --red: #d50000;
  --red-dark: #a50000;
  --red-soft: #ffebee;

  --gray-900:#0a0a0a;
  --gray-700:#2e2e2e;
  --gray-600:#424242;
  --gray-500:#616161;
  --gray-200:#e0e0e0;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --shadow-strong: 0 20px 50px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.5);
  --shadow-soft: 0 12px 36px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

/* ---------- WRAPPER ---------- */
.join-page-shell {
  max-width: 960px;
  margin: 2.5rem auto 3rem;
  padding: 0 1.5rem;
}

/* ---------- CARD ---------- */
.join-card {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  padding: 1.9rem 2rem 2rem;
  border: 1px solid rgba(255,255,255,0.6);
  overflow: hidden;
}

.join-card .card-title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-900);
}

.join-card .card-subtitle {
  margin: 0 0 1.4rem;
  font-size: 0.92rem;
  color: var(--gray-600);
}

/* ---------- FORM GRID ---------- */
.join-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.4rem;
}

/* Field base */
.join-form-grid .form-field {
  display: flex;
  flex-direction: column;
  font-size: 0.86rem;
  color: var(--gray-700);
  min-width: 0;
}

.join-form-grid .form-field.full { grid-column: 1 / -1; }

.join-form-grid .form-field label {
  margin-bottom: 0.35rem;
  font-weight: 700;
}

/* Inputs */
.join-form-grid .form-field input,
.join-form-grid .form-field select,
.join-form-grid .form-field textarea {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  padding: 0.75rem 0.95rem;
  font-size: 0.98rem;
  outline: none;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.join-form-grid .form-field input:focus,
.join-form-grid .form-field select:focus,
.join-form-grid .form-field textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(213, 0, 0, 0.12);
  background: #fff;
}

.join-form-grid textarea {
  resize: vertical;
  min-height: 110px;
}

/* ✅ Error helpers (Laravel + JS) */
.input-error{
  border-color:#dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
}
.field-error{
  margin-top: 6px;
  color:#b91c1c;
  font-weight: 800;
  font-size: .82rem;
}

/* Checkbox tap target */
.join-form-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* Help text */
.join-help {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* ---------- ALERTS ---------- */
.join-alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.join-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.join-alert.success {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ---------- FAMILY TABLE (responsive scroll) ---------- */
.join-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
}

.join-table-scroll table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.join-table-scroll th,
.join-table-scroll td {
  padding: 0.45rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: left;
  font-size: 0.88rem;
}

.join-table-scroll input {
  min-width: 140px;
  width: 100%;
}

/* ---------- TERMS BOX ---------- */
.join-terms-box {
  padding: .9rem 1rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
  max-height: 240px;
  overflow: auto;
  line-height: 1.55;
  font-size: 0.94rem;
  color: #374151;
}

/* ---------- SUBMIT ROW ---------- */
.join-actions {
  margin-top: 1.6rem;
  text-align: right;
}

/* Submit button = same vibe as home enquiry button */
.join-actions .btn,
.join-actions button.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);

  background: linear-gradient(45deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;

  box-shadow: 0 4px 12px rgba(213,0,0,0.20);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.join-actions .btn:hover,
.join-actions button.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(213,0,0,0.35);
  filter: brightness(1.02);
}

.join-actions .btn:active,
.join-actions button.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(213,0,0,0.25);
}

.join-actions .btn:focus-visible,
.join-actions button.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(213,0,0,0.16), 0 10px 24px rgba(213,0,0,0.30);
}

/* ---------- FILE UPLOAD ("Choose file") ---------- */
.join-form-grid input[type="file"] {
  font-size: 0.95rem;
  color: #374151;
  padding: 0.55rem 0.75rem; /* looks nicer */
}

/* Chrome/Edge/Safari */
.join-form-grid input[type="file"]::file-selector-button {
  appearance: none;
  border: 0;
  margin-right: 0.75rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);

  background: linear-gradient(45deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;

  box-shadow: 0 4px 12px rgba(213,0,0,0.18);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.join-form-grid input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(213,0,0,0.28);
  filter: brightness(1.03);
}

.join-form-grid input[type="file"]::file-selector-button:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(213,0,0,0.20);
}

/* Firefox */
.join-form-grid input[type="file"]::-moz-file-upload-button {
  appearance: none;
  border: 0;
  margin-right: 0.75rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);

  background: linear-gradient(45deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;

  box-shadow: 0 4px 12px rgba(213,0,0,0.18);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .join-page-shell {
    margin: 1.8rem auto 2.5rem;
    padding: 0 1rem;
  }

  .join-card {
    padding: 1.6rem 1.25rem 1.75rem;
    border-radius: 20px;
  }

  .join-form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .join-actions {
    margin-top: 1.25rem;
    text-align: right;
  }
}

@media (max-width: 600px) {
  .join-actions { text-align: center; }

  .join-actions .btn,
  .join-actions button.btn {
    width: 100%;
    padding: 0.95rem 1.2rem;
    font-size: 1rem;
  }

  .join-card {
    padding: 1.35rem 1rem 1.5rem;
  }

  .join-form-grid .form-field input,
  .join-form-grid .form-field select,
  .join-form-grid .form-field textarea {
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .join-card .card-title { font-size: 1rem; }
  .join-card .card-subtitle { font-size: 0.9rem; }
}