*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
  color: #202124;
}

.page {
  min-height: 100vh;
  background: #f5f5f5;
  padding-bottom: 96px;
}

.wrap {
  width: 1168px;
  max-width: calc(100vw - 48px);
  margin: 32px auto 48px;
  display: grid;
  grid-template-columns: 500px 448px;
  column-gap: 78px;
  align-items: start;
}

.left-pane {
  padding-top: 6px;
}

.hero-image {
  display: block;
  width: 500px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.right-pane {
  padding-top: 22px;
  padding-bottom: 40px;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 500;
  color: #202124;
}

.desc {
  width: 448px;
  max-width: 100%;
  margin: 22px 0 0;
  font-size: 14px;
  line-height: 1.72;
  color: #3c4043;
}

.policy-link {
  color: #1a73e8;
  text-decoration: none;
}

.policy-link:hover {
  text-decoration: underline;
}

.required-note {
  width: 448px;
  max-width: 100%;
  margin: 30px 0 0;
  text-align: right;
  font-size: 11px;
  line-height: 1.35;
  color: #5f6368;
}

.form {
  width: 448px;
  max-width: 100%;
  margin-top: 66px;
}

.group {
  margin-bottom: 24px;
}

.section-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  color: #202124;
}

.row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  width: 100%;
}

.floating-field {
  position: relative;
  padding-top: 8px;
}

.micro-label {
  font-size: 12px;
  line-height: 1.2;
  color: #1a73e8;
}

.micro-label span {
  color: #1a73e8;
}

.micro-label.floating {
  position: absolute;
  top: 0;
  left: 12px;
  z-index: 2;
  display: inline-block;
  margin: 0;
  padding: 0 3px;
  background: #f5f5f5;
  font-weight: 400;
}

input[type="text"],
input[type="email"] {
  display: block;
  width: 100%;
  height: 49px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #fff;
  padding: 0 12px;
  font-size: 13px;
  color: #202124;
  outline: none;
  box-shadow: none;
}

input[type="text"]:focus,
input[type="email"]:focus {
  border-color: #c7d7fb;
}

.input-error {
  border-color: #d93025 !important;
  background-color: #fff8f8 !important;
}

.error-text {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #d93025;
}

.error-text.business-email-error::before {
  content: '⚠ ';
}

@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-6px); }
  30%       { transform: translateX(6px); }
  45%       { transform: translateX(-5px); }
  60%       { transform: translateX(5px); }
  75%       { transform: translateX(-3px); }
  90%       { transform: translateX(3px); }
}

.input-shake {
  animation: input-shake 0.45s ease;
}

.helper {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: #5f6368;
}

.preferred-row {
  gap: 14px;
}

.fake-input-wrap {
  position: relative;
  width: 100%;
  cursor: text;
}

.native-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 49px;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.fake-input {
  position: relative;
  height: 49px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #fff;
  padding: 0 42px 0 12px;
  display: flex;
  align-items: center;
}

.fake-value {
  font-size: 13px;
  line-height: 1;
  color: #202124;
}

.fake-value.is-placeholder {
  color: #9aa0a6;
}

.fake-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #3c4043;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fake-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.58;
  color: #5f6368;
}

.checkbox-row.second {
  margin-top: 16px;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #4285f4;
  flex: 0 0 auto;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
  margin-bottom: 24px;
}

button[type="submit"] {
  min-width: 145px;
  height: 38px;
  border: 0;
  border-radius: 4px;
  background: #4a86f7;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 18px;
}

button[type="submit"]:hover {
  background: #3f7cf1;
}

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Loading state cho submit button: an text goc + hien spinner xoay o giua.
   Ap dung khi user click Submit va JS random-delay truoc khi mo modal login. */
button[type="submit"].btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
button[type="submit"].btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
  .wrap {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }

  .hero-image,
  .desc,
  .required-note,
  .form {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .page {
    padding-bottom: 120px;
  }

  .wrap {
    grid-template-columns: 1fr;
    row-gap: 30px;
    margin-bottom: 64px;
  }

  .right-pane {
    padding-top: 0;
    padding-bottom: 48px;
  }
}

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

/* ===== Custom Date / Time Picker ===== */
.dt-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 49px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.dt-trigger:hover {
  border-color: #c7d7fb;
}

.dt-trigger:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.18);
}

.dt-trigger[aria-expanded="true"] {
  border-color: #1a73e8;
  border-width: 2px;
}

.dt-icon {
  display: flex;
  align-items: center;
  color: #5f6368;
  flex-shrink: 0;
}

.dt-value {
  font-size: 14px;
  color: #202124;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dt-value.placeholder {
  color: #9aa0a6;
}

.dt-popover {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 316px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  padding: 16px;
  z-index: 100;
  animation: dtFadeDown 0.18s ease both;
}

.dt-popover.open {
  display: block;
}

@keyframes dtFadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dt-popover-time {
  left: auto;
  right: 0;
  width: 240px;
}

.dt-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dt-pop-time-header {
  justify-content: flex-start;
}

.dt-nav {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #5f6368;
  transition: background 0.12s;
  padding: 0;
}

.dt-nav:hover {
  background: #f1f3f4;
}

.dt-month-label {
  font-size: 14px;
  font-weight: 600;
  color: #202124;
}

.dt-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.3px;
}

.dt-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dt-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
  color: #202124;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  margin: 0 auto;
}

.dt-day:hover:not(.past):not(.selected) {
  background: #e8f0fe;
}

.dt-day.muted {
  color: #c4c7c5;
}

.dt-day.past {
  color: #d0d0d0;
  cursor: default;
  pointer-events: none;
}

.dt-day.today {
  border: 1.5px solid #1a73e8;
  font-weight: 600;
}

.dt-day.selected {
  background: #1a73e8;
  color: #fff;
  font-weight: 500;
}

.dt-tz {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.dt-slots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.dt-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 1.5px solid #1a73e8;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #1a73e8;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.dt-slot:hover:not(.disabled):not(.selected) {
  background: #e8f0fe;
}

.dt-slot.selected {
  background: #1a73e8;
  color: #fff;
}

.dt-slot.disabled {
  border-color: #e5e7eb;
  color: #d0d0d0;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 600px) {
  .dt-popover {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
    animation: dtSlideUp 0.22s ease both;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px 16px 32px;
  }

  .dt-popover-time {
    right: 0;
    left: 0;
    width: 100%;
  }

  @keyframes dtSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
