/* ═══════════════════════════════════════════
   AUTH MODAL — Modern Responsive Design
═══════════════════════════════════════════ */

/* Backdrop */
.auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.auth-backdrop.in { opacity: 1; }

/* Override Bootstrap modal */
.auth-modal.modal {
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-modal.modal .modal-dialog {
  max-width: 420px;
  width: calc(100% - 30px);
  margin: 40px auto;
}

.auth-modal.modal .modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
  padding: 0;
}

/* ── Header ── */
.auth-modal .modal-header {
  background: linear-gradient(135deg, #E8263C 0%, #C01830 100%);
  border: none;
  padding: 28px 28px 24px;
  text-align: center;
  position: relative;
}

.auth-modal .modal-header .auth-logo {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 22px;
  color: #fff;
}

.auth-modal .modal-header h3.modal-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.3px;
}

.auth-modal .modal-header p.auth-subtitle {
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  margin: 4px 0 0;
}

.auth-modal .close {
  position: absolute;
  top: 14px;
  right: 16px;
  color: rgba(255,255,255,0.8);
  opacity: 1;
  font-size: 22px;
  text-shadow: none;
  line-height: 1;
  padding: 4px 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.auth-modal .close:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ── Body ── */
.auth-modal .modal-body {
  padding: 28px 28px 8px;
  border: none;
}

/* ── Input Group ── */
.auth-field {
  position: relative;
  margin-bottom: 16px;
}

.auth-field .auth-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b8c8;
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 2;
}

.auth-field input:focus ~ .auth-icon,
.auth-field input:not(:placeholder-shown) ~ .auth-icon {
  color: #E8263C;
}

.auth-field input {
  width: 100%;
  padding: 12px 42px 12px 42px;
  border: 1.8px solid #e8ecf4;
  border-radius: 10px;
  font-size: 14px;
  color: #2d3142;
  background: #f7f9fc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: #E8263C;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(250, 40, 55, 0.10);
}

.auth-field input::placeholder { color: #aab0c4; }

/* Password toggle */
.auth-eye {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #b0b8c8;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
  z-index: 2;
}
.auth-eye:hover { color: #E8263C; }

/* Availability status */
#user-availability-status {
  font-size: 12px;
  margin-top: 4px;
  display: block;
  padding-left: 4px;
}

/* ── Checkbox ── */
.auth-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

.auth-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #E8263C;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-check label {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  cursor: pointer;
}

.auth-check label a {
  color: #E8263C;
  text-decoration: none;
}
.auth-check label a:hover { text-decoration: underline; }

/* ── Submit Button ── */
.auth-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #E8263C 0%, #C01830 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(250, 40, 55, 0.30);
  letter-spacing: 0.3px;
  margin-top: 4px;
}
.auth-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(250, 40, 55, 0.38);
}
.auth-btn:active { transform: translateY(0); }

/* ── Footer ── */
.auth-modal .modal-footer {
  border: none;
  padding: 16px 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-modal .modal-footer p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.auth-modal .modal-footer a {
  color: #E8263C;
  font-weight: 600;
  text-decoration: none;
}
.auth-modal .modal-footer a:hover { text-decoration: underline; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
  color: #c5cad8;
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8ecf4;
}

/* Hint text */
.auth-hint {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  padding: 0 4px 4px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 576px) {
  .auth-modal.modal .modal-dialog {
    margin: 10px auto;
    width: calc(100% - 16px);
  }

  /* Compact header on mobile */
  .auth-modal .modal-header {
    padding: 16px 16px 12px;
  }
  .auth-modal .modal-header .auth-logo {
    width: 40px;
    height: 40px;
    font-size: 17px;
    margin-bottom: 6px;
  }
  .auth-modal .modal-header h3.modal-title {
    font-size: 17px;
  }
  .auth-modal .modal-header p.auth-subtitle {
    font-size: 12px;
  }

  /* Tighter body */
  .auth-modal .modal-body {
    padding: 16px 16px 4px;
  }
  .auth-field {
    margin-bottom: 11px;
  }
  .auth-field input {
    padding: 10px 38px 10px 38px;
    font-size: 14px;
  }
  .auth-check {
    margin-bottom: 11px;
  }
  .auth-btn {
    padding: 12px;
    font-size: 14px;
  }

  /* Tighter footer */
  .auth-modal .modal-footer {
    padding: 10px 16px 16px;
    gap: 4px;
  }

  /* Divider */
  .auth-divider {
    margin: 2px 0 11px;
  }

  /* Compact modal content — scroll inside if still too tall */
  .auth-modal.modal .modal-content {
    border-radius: 14px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
