/**
 * Access Denied Page Styling
 */

/* ============================================
   APPRAISAL GATE PAGE
   /user/login?destination=/node/add/appraisal
   ============================================ */

/* Hide Drupal tabs (Log in / Create new account / Reset password) on gate page */
body.appraisal-gate .tabs,
body.appraisal-gate .tabs--primary,
body.appraisal-gate nav.tabs,
body.appraisal-gate .block-local-tasks-block {
  display: none !important;
}

/* Hide any system status messages on the gate page */
body.appraisal-gate .messages--status,
body.appraisal-gate .messages--warning {
  display: none !important;
}

/* Hide the default page title — the gate card has its own */
body.appraisal-gate .page-title,
body.appraisal-gate h1.page-title {
  display: none !important;
}

/* Hide breadcrumb on the gate page */
body.appraisal-gate .breadcrumb-wrapper {
  display: none !important;
}

/* Gate card — the intro/welcome block */
.appraisal-gate-card {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
}

.appraisal-gate-card .gate-icon {
  margin-bottom: 1rem;
}

.appraisal-gate-card .gate-title {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #1a365d !important;
  -webkit-text-fill-color: #1a365d !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 0.75rem 0 !important;
  line-height: 1.3;
}

.appraisal-gate-card .gate-subtitle {
  font-size: 1.05rem;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.appraisal-gate-card .gate-reassurance {
  font-size: 0.85rem;
  color: #718096;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  display: inline-block;
}

/* Style the login form itself when in gate mode */
.appraisal-gate-form {
  max-width: 560px !important;
  margin: 2rem auto !important;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2.5rem 3rem !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Form labels */
.appraisal-gate-form .form-item label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

/* Form inputs */
.appraisal-gate-form .form-item input[type="text"],
.appraisal-gate-form .form-item input[type="password"],
.appraisal-gate-form .form-item input[type="email"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #d2d6dc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.appraisal-gate-form .form-item input:focus {
  border-color: #d4a574;
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
  outline: none;
}

/* Login button */
.appraisal-gate-form .form-actions .button--primary,
.appraisal-gate-form .form-actions .form-submit,
.appraisal-gate-form .form-actions input[type="submit"] {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.appraisal-gate-form .form-actions .button--primary:hover,
.appraisal-gate-form .form-actions .form-submit:hover,
.appraisal-gate-form .form-actions input[type="submit"]:hover {
  background: linear-gradient(135deg, #2c5282 0%, #3b6baa 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
}

/* Google login button override in gate mode */
.appraisal-gate-form .google-login-wrapper {
  margin-top: 1rem !important;
}

.appraisal-gate-form .google-login-wrapper a {
  width: 100%;
  display: block !important;
  padding: 0.7rem 1.5rem !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  box-sizing: border-box;
  text-align: center;
}

/* Register CTA section below the form */
.appraisal-gate-register {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 3rem;
  text-align: center;
}

.register-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #a0aec0;
  font-size: 0.85rem;
}

.register-divider::before,
.register-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.gate-btn-register {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  color: #1a365d;
  border: 2px solid #d4a574;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.gate-btn-register:hover {
  background: linear-gradient(135deg, #d4a574 0%, #c09560 100%);
  color: #ffffff;
  border-color: #d4a574;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
  text-decoration: none;
}

.register-note {
  font-size: 0.8rem;
  color: #a0aec0;
  margin: 0.75rem 0 0;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .appraisal-gate-card {
    padding: 1.5rem 1rem 1rem;
    margin-bottom: 1rem;
  }

  .appraisal-gate-card .gate-title {
    font-size: 1.4rem !important;
  }

  .appraisal-gate-card .gate-subtitle {
    font-size: 0.95rem;
  }

  .appraisal-gate-form {
    padding: 1.5rem !important;
    border-radius: 10px;
    margin: 1rem 0.5rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .appraisal-gate-register {
    padding: 0 1.5rem;
  }
}


/* ============================================
   GENERIC ACCESS DENIED STYLES
   (Non-appraisal 403 pages)
   ============================================ */

.page-node-add .messages--error {
  display: none;
}

.access-denied-wrapper {
  text-align: center;
  padding: 60px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.access-denied-wrapper h1 {
  color: #2c3e50;
  font-size: 2.5em;
  margin-bottom: 20px;
}

.access-denied-wrapper .lead {
  font-size: 1.2em;
  color: #6c757d;
  margin-bottom: 30px;
  line-height: 1.6;
}

.access-denied-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.access-denied-actions .btn {
  padding: 12px 30px;
  font-size: 1.1em;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.access-denied-actions .btn-primary {
  background: linear-gradient(135deg, #d4a574, #c19656);
  color: #ffffff;
  border: none;
}

.access-denied-actions .btn-primary:hover {
  background: linear-gradient(135deg, #c19656, #b08545);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.access-denied-actions .btn-secondary {
  background: #ffffff;
  color: #2c3e50;
  border: 2px solid #d4a574;
}

.access-denied-actions .btn-secondary:hover {
  background: #f8f9fa;
  border-color: #c19656;
}

.messages--info {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  color: #1565c0;
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.messages--status a.btn {
  display: inline-block;
  margin: 0 10px;
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.messages--status a.btn-primary {
  background: linear-gradient(135deg, #d4a574, #c19656);
  color: #ffffff;
}

.messages--status a.btn-primary:hover {
  background: linear-gradient(135deg, #c19656, #b08545);
  transform: translateY(-2px);
}

.messages--status a.btn-secondary {
  background: #ffffff;
  color: #2c3e50;
  border: 2px solid #d4a574;
}

.messages--status a.btn-secondary:hover {
  background: #f8f9fa;
  border-color: #c19656;
}

@media (max-width: 768px) {
  .access-denied-actions {
    flex-direction: column;
    align-items: center;
  }

  .access-denied-actions .btn {
    width: 100%;
    max-width: 300px;
  }
}
