/* ================================================================
   PASSWORD GATE — Page Protection Overlay
   mgm Vietnam 10-Year Anniversary Website
   
   Replicates Webflow's "Page Password" feature visually.
   Matches the dark luxury aesthetic of the mgm brand.
================================================================ */

/* ── OVERLAY CONTAINER ── */
.pw-gate {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.pw-gate.pw-gate--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── BACKGROUND VIDEO ── */
.pw-gate__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
}

/* ── CONTENT WRAPPER ── */
.pw-gate__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

/* ── LOGO ── */
.pw-gate__logo {
  width: 160px;
  height: auto;
  margin-bottom: 0.5rem;
  filter: brightness(1);
}

/* ── TITLE "Protected Page" ── */
.pw-gate__title {
  font-family: 'Redriver', 'Georgia', serif;
  font-size: 3.5rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
}

/* ── "ACCESS CODE" LABEL ── */
.pw-gate__label {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: -0.5rem;
}

/* ── INPUT FIELD ── */
.pw-gate__input-wrapper {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.pw-gate__input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.9rem;
  color: #333; /* Dark text for light background */
  background: #ffffff; /* Solid white background */
  border: 1px solid #ffffff;
  border-radius: 40px; /* Pill shape like Webflow */
  outline: none;
  transition: box-shadow 0.3s ease;
  box-sizing: border-box;
}

.pw-gate__input::placeholder {
  color: #888;
  font-size: 0.85rem;
}

.pw-gate__input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Toggle password visibility icon */
.pw-gate__toggle-vis {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #666; /* Darker color for icon on white bg */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s ease;
}

.pw-gate__toggle-vis:hover {
  color: #333;
}

.pw-gate__toggle-vis svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ── GO BUTTON ── */
.pw-gate__submit {
  width: 100%;
  max-width: 360px;
  padding: 14px 24px;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  background: #555555; /* Solid grey background */
  border: 1px solid #555555;
  border-radius: 40px; /* Pill shape like Webflow */
  cursor: pointer;
  transition: background 0.3s ease;
}

.pw-gate__submit:hover {
  background: #444444;
  border-color: #444444;
}

.pw-gate__submit:active {
  transform: scale(0.98);
}

/* ── ERROR STATE ── */
.pw-gate__error {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.8rem;
  color: #ff6b6b;
  opacity: 0;
  transition: opacity 0.3s ease;
  min-height: 1.2em;
}

.pw-gate__error.pw-gate__error--visible {
  opacity: 1;
}

/* ── SHAKE ANIMATION (wrong password) ── */
@keyframes pw-shake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-6px); }
  30%, 70% { transform: translateX(6px); }
}

.pw-gate__input--shake {
  animation: pw-shake 0.5s ease;
  border-color: #ff6b6b !important;
}

/* ── RESPONSIVE ── */
@media screen and (max-width: 767px) {
  .pw-gate__title {
    font-size: 2.5rem;
  }
  .pw-gate__logo {
    width: 120px;
  }
  .pw-gate__content {
    padding: 1.5rem;
    gap: 1.2rem;
  }
  .pw-gate__input,
  .pw-gate__submit {
    max-width: 300px;
  }
}

@media screen and (max-width: 479px) {
  .pw-gate__title {
    font-size: 2rem;
  }
  .pw-gate__logo {
    width: 100px;
  }
  .pw-gate__content {
    gap: 1rem;
  }
  .pw-gate__input,
  .pw-gate__submit {
    max-width: 85vw;
  }
}
