/* ==========================================================
   HiruConnect Visitor Registration
========================================================== */

:root {
  --primary: #e30613;
  --primary-hover: #c70410;

  --accent: #ff7a1a;

  --background: #eef2f7;
  --card: #ffffff;

  --text: #2b2b2b;
  --muted: #6b7280;

  --border: #e5e7eb;

  --success: #15803d;
  --success-bg: #dcfce7;

  --danger: #dc2626;

  --radius: 22px;

  --shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

/* ===================================
   RESET
=================================== */

* {
  margin: 0;

  padding: 0;

  box-sizing: border-box;
}

/* ==========================
   Global Interaction Reset
   ========================== */

button,
input,
select,
textarea,
a {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: none;
}

html,
body {
  min-height: 100%;

  font-family: Inter, Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #f6f7fb, #eef2f7);

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 40px;
}

/* ===================================
   MAIN CARD
=================================== */

.registration-card {
  width: 100%;

  max-width: 1180px;

  background: #fff;

  border-radius: 24px;

  overflow: hidden;

  display: grid;

  grid-template-columns: 420px 1fr;

  box-shadow: var(--shadow);
}

/* ===================================
   LEFT PANEL
=================================== */

.registration-brand {
  background: linear-gradient(180deg, #e30613, #b6030f);

  color: white;

  padding: 55px 45px;

  display: flex;

  flex-direction: column;

  justify-content: center;
}

/* ===================================
   BRAND LOGO BOX
=================================== */

.registration-brand img {
  width: 210px;

  height: auto;
}

.registration-brand img {
  background: #fff;

  padding: 18px 25px;

  border-radius: 22px;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);

  margin-bottom: 35px;
}

.registration-brand h1 {
  font-size: 38px;

  margin-bottom: 8px;

  font-weight: 700;
}

.registration-brand h2 {
  font-size: 20px;

  font-weight: 500;

  opacity: 0.95;

  margin-bottom: 30px;
}

.registration-brand p {
  line-height: 1.8;

  font-size: 15px;

  opacity: 0.95;
}

.event-info {
  margin: 40px 0;
}

.event-info div {
  display: flex;

  align-items: center;

  gap: 14px;

  margin-bottom: 18px;

  font-size: 15px;
}

.event-info i {
  width: 42px;

  height: 42px;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.18);

  display: flex;

  align-items: center;

  justify-content: center;
}

.registration-brand small {
  margin-top: auto;

  opacity: 0.75;
}

/* ===================================
   RIGHT PANEL
=================================== */

.registration-form {
  padding: 55px;
}

.registration-form h2 {
  font-size: 34px;

  color: var(--text);

  margin-bottom: 10px;
}

.subtitle {
  color: var(--muted);

  margin-bottom: 35px;
}

/* ===================================
   FORM
=================================== */

form.processing {
  opacity: 0.65;

  pointer-events: none;
}

.form-group {
  margin-bottom: 22px;
}

label {
  display: block;

  margin-bottom: 8px;

  font-weight: 600;

  color: var(--text);
}

label i {
  color: var(--primary);

  margin-right: 8px;
}

.required {
  color: var(--primary);
}

/* ===================================
   INPUTS
=================================== */

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;

  height: 54px;

  padding: 0 46px 0 18px;

  border: 1px solid var(--border);

  border-radius: 14px;

  background: #fff;

  font-size: 15px;

  transition: 0.25s;
}

.input-wrapper input:hover {
  border-color: #d1d5db;
}

.input-wrapper input:focus {
  outline: none;

  border-color: var(--primary);

  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.1);
}

/* ===================================
   SELECT
=================================== */

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;

  height: 54px;

  padding: 0 50px 0 18px;

  border-radius: 14px;

  border: 1px solid var(--border);

  background: #fff;

  font-size: 15px;

  cursor: pointer;

  appearance: none;

  transition: 0.25s;
}

.select-wrapper select:hover {
  border-color: #d1d5db;
}

.select-wrapper select:focus {
  outline: none;

  border-color: var(--primary);

  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.1);
}

.select-wrapper::after {
  content: "\f078";

  font-family: "Font Awesome 6 Free";

  font-weight: 900;

  position: absolute;

  right: 18px;

  top: 50%;

  transform: translateY(-50%);

  color: #999;

  pointer-events: none;
}

/* ===================================
   CHECKBOX
=================================== */

.label-row {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 8px;
}

.checkbox-inline {
  display: flex;

  align-items: center;

  gap: 8px;

  font-size: 13px;

  color: var(--muted);
}

.checkbox-inline input {
  accent-color: var(--primary);
}

/* ===================================
   SUBMIT BUTTON
=================================== */

button {
  width: 100%;

  height: 54px;

  border: none;

  border-radius: 14px;

  background: var(--primary);

  color: #fff;

  font-size: 16px;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s;
}

button:hover {
  background: var(--primary-hover);

  transform: translateY(-2px);
}

button i {
  margin-right: 8px;
}

/* ===================================
   VALIDATION
=================================== */

.validation-icon {
  position: absolute;

  right: 16px;

  top: 50%;

  transform: translateY(-50%);

  font-size: 16px;

  pointer-events: none;
}

.input-valid {
  border-color: var(--success) !important;
}

.input-invalid {
  border-color: var(--danger) !important;
}

.validation-success {
  color: var(--success);
}

.validation-error {
  color: var(--danger);
}

/* ===================================
   SUCCESS MODAL
=================================== */

.modal-overlay {
  position: fixed;

  inset: 0;

  background: rgba(15, 23, 42, 0.55);

  display: none;

  justify-content: center;

  align-items: center;

  padding: 30px;

  z-index: 9999;

  backdrop-filter: blur(5px);
}

.modal-box {
  width: 100%;

  max-width: 500px;

  background: #fff;

  border-radius: 24px;

  padding: 40px;

  text-align: center;

  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.18);

  animation: modalShow 0.28s ease;
}

.success-icon {
  width: 82px;

  height: 82px;

  margin: 0 auto 24px;

  border-radius: 50%;

  display: flex;

  align-items: center;

  justify-content: center;

  background: var(--success-bg);

  color: var(--success);

  font-size: 44px;
}

.modal-box h2 {
  margin-bottom: 12px;

  font-size: 30px;
}

.modal-box p {
  color: var(--muted);

  line-height: 1.7;
}

/* ===================================
   REFERENCE CARD
=================================== */

.reference-box {
  margin: 30px 0;

  padding: 24px;

  border-radius: 18px;

  background: #fff7f2;

  border: 2px dashed var(--accent);
}

.reference-label {
  font-size: 14px;

  color: var(--muted);

  margin-bottom: 12px;

  font-weight: 600;
}

.reference-number {
  color: var(--primary);

  font-size: 34px;

  font-weight: 700;

  letter-spacing: 3px;
}

/* ===================================
   MODAL BUTTONS
=================================== */

.modal-box .whatsapp-button {
  display: flex;

  justify-content: center;

  align-items: center;

  gap: 12px;

  width: 100%;

  height: 52px;

  margin-top: 18px;

  border-radius: 14px;

  background: #25d366;

  color: #fff;

  text-decoration: none;

  font-weight: 700;

  transition: 0.25s;
}

.modal-box .whatsapp-button:hover {
  background: #1ebe5d;

  transform: translateY(-2px);
}

#modalOkButton {
  margin-top: 15px;
}

/* ===================================
   TOAST
=================================== */

.toast {
  position: fixed;

  right: 30px;

  bottom: 30px;

  min-width: 330px;

  max-width: 420px;

  background: #fff;

  border-radius: 18px;

  padding: 18px 22px;

  display: flex;

  align-items: center;

  gap: 18px;

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);

  transform: translateY(120px);

  opacity: 0;

  transition: 0.35s;

  z-index: 99999;
}

.toast.show {
  opacity: 1;

  transform: translateY(0);
}

.toast.success {
  border-left: 5px solid var(--success);
}

.toast.error {
  border-left: 5px solid var(--danger);
}

.toast.warning {
  border-left: 5px solid #f59e0b;
}

.toast.info {
  border-left: 5px solid #2563eb;
}

.toast-icon {
  width: 46px;

  height: 46px;

  border-radius: 50%;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 20px;
}

.toast.success .toast-icon {
  background: #dcfce7;

  color: #15803d;
}

.toast.error .toast-icon {
  background: #fee2e2;

  color: #dc2626;
}

.toast.warning .toast-icon {
  background: #fef3c7;

  color: #d97706;
}

.toast.info .toast-icon {
  background: #dbeafe;

  color: #2563eb;
}

.toast-content {
  display: flex;

  flex-direction: column;
}

#toastTitle {
  font-size: 15px;

  font-weight: 700;

  margin-bottom: 4px;
}

#toastMessage {
  color: var(--muted);

  line-height: 1.5;
}

/* ===================================
   ANIMATIONS
=================================== */

@keyframes modalShow {
  from {
    opacity: 0;

    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;

    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ===================================
   RESPONSIVE DESIGN
=================================== */

/* Large Tablets */

@media (max-width: 1000px) {
  body {
    padding: 25px;
  }

  .registration-card {
    grid-template-columns: 350px 1fr;
  }

  .registration-brand {
    padding: 40px 30px;
  }

  .registration-brand h1 {
    font-size: 32px;
  }

  .registration-form {
    padding: 40px;
  }
}

/* Tablets */

@media (max-width: 800px) {
  body {
    padding: 20px;

    align-items: flex-start;
  }

  .registration-card {
    grid-template-columns: 1fr;

    max-width: 600px;
  }

  .registration-brand {
    padding: 35px;

    text-align: center;

    align-items: center;
  }

  .registration-brand img {
    width: 180px;

    padding: 15px 20px;

    border-radius: 18px;
  }

  .registration-brand h1 {
    font-size: 32px;
  }

  .event-info {
    width: 100%;

    text-align: left;
  }

  .registration-form {
    padding: 35px;
  }
}

/* Mobile */

@media (max-width: 600px) {
  body {
    padding: 12px;
  }

  .registration-card {
    border-radius: 18px;
  }

  .registration-brand {
    padding: 30px 22px;
  }

  .registration-brand img {
    width: 150px;

    padding: 12px 18px;

    border-radius: 16px;

    margin-bottom: 25px;
  }

  .registration-brand h1 {
    font-size: 28px;
  }

  .registration-brand h2 {
    font-size: 17px;
  }

  .registration-brand p {
    font-size: 14px;
  }

  .event-info {
    margin: 25px 0;
  }

  .event-info div {
    font-size: 14px;
  }

  .registration-form {
    padding: 25px 20px;
  }

  .registration-form h2 {
    font-size: 26px;
  }

  .subtitle {
    margin-bottom: 25px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .input-wrapper input,
  .select-wrapper select {
    height: 50px;
  }

  button {
    height: 52px;
  }

  .label-row {
    flex-direction: column;

    align-items: flex-start;

    gap: 8px;
  }

  .checkbox-inline {
    margin-left: 0;
  }
}

/* Very Small Phones */

@media (max-width: 400px) {
  .registration-brand {
    padding: 25px 18px;
  }

  .registration-form {
    padding: 20px 15px;
  }

  .registration-brand h1 {
    font-size: 25px;
  }

  .registration-form h2 {
    font-size: 23px;
  }

  .modal-box {
    padding: 28px 20px;
  }

  .reference-number {
    font-size: 27px;

    letter-spacing: 2px;
  }
}

/* ===================================
   MODAL RESPONSIVE
=================================== */

@media (max-width: 600px) {
  .modal-overlay {
    padding: 15px;
  }

  .modal-box {
    border-radius: 20px;

    padding: 30px 20px;
  }

  .success-icon {
    width: 70px;

    height: 70px;

    font-size: 36px;
  }

  .modal-box h2 {
    font-size: 24px;
  }
}

/* ===================================
   TOAST RESPONSIVE
=================================== */

@media (max-width: 600px) {
  .toast {
    left: 15px;

    right: 15px;

    bottom: 15px;

    min-width: auto;

    width: auto;
  }
}

/* ===================================
   SMOOTH UI
=================================== */

input,
select,
button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(0.98);
}

/* Remove default select outline */

select {
  outline: none;
}

/* Better autofill appearance */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);

  transition: background-color 5000s ease-in-out 0s;
}

/* Loading state */

button:disabled {
  opacity: 0.65;

  cursor: not-allowed;

  transform: none;
}
