/* ================================
   Fonts
=================================== */
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/Outfit-Regular.woff2') format('woff2'),
       url('../fonts/Outfit-Regular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/Outfit-Medium.woff2') format('woff2'),
       url('../fonts/Outfit-Medium.woff') format('woff');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/Outfit-SemiBold.woff2') format('woff2'),
       url('../fonts/Outfit-SemiBold.woff') format('woff');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/Outfit-Bold.woff2') format('woff2'),
       url('../fonts/Outfit-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ================================
   Reset + interaction polish
=================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-width: 0; }
*:focus, *:focus-visible { outline: none; }
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }
body { font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

/* ================================
   Variables
=================================== */
:root {
  /* Material Symbols Rounded */
  --msr-size: 20px;
  --msr-color: currentColor;
  --msr-wght: 400;
  --msr-fill: 0;
  --msr-grad: -25;
  --msr-opsz: 20;
  
  /* Colors */
  --blue-200:#B5E1EC;
  --blue-300:#82CADE;
  --blue-400:#48ABC8;
  --blue-500:#2DBFAD;
  --blue-950:#132A39;
  
  /* Drawer/Modal */
  --drawer-width: 660px;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-sm: 10px;
  --border: #E6E6E6;
  --border-strong: #D5D5D5;
  --text: #111111;
  --muted: #6F6F6F;
  --hint: #7A4DF3;
  --btn: #0A0A0A;
  --bg: #FFFFFF;
  --overlay: rgba(0,0,0,.45);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
}

/* ================================
   Header
=================================== */
.hawaa-header{
  position: sticky; top: 0;
  z-index: 1000;
  height: 58px;
  background: #fff;
  transition: box-shadow .3s ease, border-radius .3s ease;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  width: 100%;
}
.hawaa-header.scrolled{
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.header-container{
  height: 58px;
  display:flex; align-items:center; justify-content:space-between;
  padding: 0 16px;
}

/* Logo */
.header-logo{ display:flex; align-items:center; height:100%; }
.header-logo img{
  height: 20px; width:auto; display:block; object-fit:contain;
}

/* Actions */
.header-actions{ display:flex; align-items:center; gap:12px; height:100%; }

/* ================================
   Login Button
=================================== */
.header-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: 18px;
  background: #287392;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.header-login-btn:hover { background: #1f5d75; }
.header-login-btn:active { transform: translateY(0.5px); }
.header-login-btn .material-symbols-rounded {
  font-size: 20px; line-height: 1;
}

/* ================================
   Unified Icon Buttons
=================================== */
.nav-icon,
.hamburger-btn,
.nav-close{
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: none;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;

  border-radius: 50%;
  cursor: pointer;
  color: #1a1a1a;
  transition: background-color .2s ease, color .2s ease, transform .06s ease;
}
.nav-icon:hover,
.hamburger-btn:hover,
.nav-close:hover{ background-color: rgba(0,0,0,.06); }
.nav-icon:active,
.hamburger-btn:active,
.nav-close:active{
  background-color: rgba(0,0,0,.10);
  transform: translateY(0.5px);
}

/* Normalize icon size inside buttons */
.nav-icon .material-symbols-rounded,
.hamburger-btn .material-symbols-rounded,
.nav-close .material-symbols-rounded{
  font-size: 24px;
  line-height: 1;
}

/* ================================
   Mobile Nav (overlay + panel)
=================================== */
.mobile-nav{
  position:fixed; inset:0; z-index:1001;
  background: rgba(0,0,0,.5);
  visibility:hidden; opacity:0; transition: all .3s ease;
}
.mobile-nav.active{ visibility:visible; opacity:1; }

.nav-overlay{ position:absolute; inset:0; }

.nav-panel{
  position:absolute; top:0; right:0; height:100%;
  width:100%; max-width:460px;
  background:#f8f9fa;
  transform: translateX(100%); transition: transform .3s ease;
  display:flex; flex-direction:column;
  border-radius: 24px 0 0 24px;
}
.mobile-nav.active .nav-panel{ transform: translateX(0); }

/* Nav header */
.nav-header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 20px 24px; background:#fff; border-bottom:1px solid #eee;
}
.nav-title{
  font-weight:600;
  font-size: 28px; color:#1a1a1a;
}
.nav-icons{ display:flex; gap:8px; }

/* Nav content */
.nav-content{ flex:1; overflow-y:auto; padding:16px 0; }
.nav-section{ margin-bottom:16px; background:#fff; padding:20px; border-radius:20px; }
.section-title{
  font-weight:600; font-size:12px;
  text-transform:uppercase; letter-spacing:.1em; color:#6b7280; margin-bottom:12px;
}
.nav-links{ list-style:none; }
.nav-links li{ margin-bottom:4px; }
.nav-links a{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0; color:#1a1a1a; text-decoration:none;
  font-weight:500; font-size:18px;
  transition: color .2s ease;
}
.nav-links a:hover{ color:#287392; }
.nav-links a .material-symbols-rounded{ font-size:20px; color:#1a1a1a; opacity:.6; transition:opacity .2s; }
.nav-links a:hover .material-symbols-rounded{ opacity:1; }

/* Nav Logout Section */
.nav-logout-section {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid #eee;
}

.nav-logout-btn {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 2px solid #e1e1e1;
  border-radius: 16px;
  color: #666;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.nav-logout-btn:hover {
  background: #fff5f5;
  border-color: #ffcccc;
  color: #e03a3a;
}

.nav-logout-btn:active {
  transform: translateY(0.5px);
}

.nav-logout-btn .material-symbols-rounded {
  font-size: 20px;
}

/* State */
body.menu-open{ overflow:hidden; }

/* ============================================================
   MATERIAL SYMBOLS ROUNDED — unified system
============================================================ */
.material-symbols-rounded{
  font-family: 'Material Symbols Rounded' !important;
  font-style: normal !important;
  font-weight: normal !important;
  font-size: var(--msr-size) !important;
  line-height: 1 !important;
  display: inline-block !important;
  vertical-align: -0.2em !important;
  color: var(--msr-color) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variation-settings:
    'FILL' var(--msr-fill),
    'wght' var(--msr-wght),
    'GRAD' var(--msr-grad),
    'opsz' var(--msr-opsz) !important;
}

/* Optional helpers */
.msr-16{ --msr-size:16px; --msr-opsz:20; }
.msr-20{ --msr-size:20px; --msr-opsz:20; }
.msr-24{ --msr-size:24px; --msr-opsz:24; }
.msr-28{ --msr-size:28px; --msr-opsz:24; }
.msr-32{ --msr-size:32px; --msr-opsz:24; }

/* ============================================================
   NEW AUTH DRAWER SYSTEM
============================================================ */

/* Auth Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Auth Drawer */
.auth-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 450px;
  height: 100%;
  background: white;
  z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
}

.auth-drawer.active {
  transform: translateX(0);
}

/* Auth Header */
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.auth-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.close-btn .material-symbols-rounded {
  font-size: 24px;
}

/* Auth Body */
.auth-body {
  flex: 1;
  padding: 30px 20px;
  overflow-y: auto;
}

/* Auth Screens */
.auth-screen {
  max-width: 350px;
  margin: 0 auto;
}

.auth-screen h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
  color: #1a1a1a;
}

.auth-screen form {
  margin: 30px 0;
}

/* ================================
   UPDATED INPUT STYLES (FULLY ROUNDED)
=================================== */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.input-group input {
  width: 100%;
  height: 48px;
  padding: 12px 16px;
  border: 2px solid #e1e1e1;
  border-radius: 24px; /* Fully rounded */
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.input-group input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(45, 191, 173, 0.1);
}

.input-group input::placeholder {
  color: #999;
}

/* Phone Input */
.phone-input {
  position: relative;
  display: flex;
  align-items: center;
}

.country-code {
  position: absolute;
  left: 16px;
  z-index: 1;
  font-weight: 600;
  color: #333;
  pointer-events: none;
}

.phone-input input {
  padding-left: 55px;
}

/* ================================
   UPDATED BUTTON STYLES (PRIMARY/SECONDARY)
=================================== */

/* Primary Button Structure */
.primary-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0 2rem;
  border-radius: 9999px; /* Pill shape */
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  
  /* Primary styling */
  background: var(--blue-950);
  color: white;
  border: none;
  box-sizing: border-box; /* <-- critical: prevents overflow */
}

.primary-btn .button-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;       /* ensures layers never bleed past the pill */
  pointer-events: none;
}

.primary-btn .button-bg-layers {
  position: absolute;
  left: 50%;
  transform: translate(-50%);
  top: -60%;
  aspect-ratio: 1/1;
  width: max(245%, 10rem);
}

.primary-btn .button-bg-layer {
  border-radius: 9999px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scale(0);
}

.primary-btn .button-bg-layer-1 { background-color: var(--blue-300); }
.primary-btn .button-bg-layer-2 { background-color: var(--blue-400); }
.primary-btn .button-bg-layer-3 { background-color: var(--blue-200); }

.primary-btn .button-inner {
  position: relative;
  pointer-events: none;
  display: block;
}

.primary-btn .button-inner-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateY(70%);
}

.primary-btn .button-inner-static {
  display: block;
}

/* Primary Button Hover */
.primary-btn:hover .button-inner-static {
  opacity: 0;
  transform: translateY(-70%);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s linear;
}

.primary-btn:hover .button-inner-hover {
  opacity: 1;
  transform: translateY(0);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1), opacity 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.primary-btn:hover .button-bg-layer {
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s linear;
}

.primary-btn:hover .button-bg-layer-1 { transform: scale(1); }
.primary-btn:hover .button-bg-layer-2 { transform: scale(1); transition-delay: 0.1s; }
.primary-btn:hover .button-bg-layer-3 { transform: scale(1); transition-delay: 0.2s; }

.primary-btn:active {
  transform: translateY(1px);
}

.primary-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.primary-btn:disabled .button-bg {
  background: #ccc;
}

/* Auth Switch */
.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: #666;
  font-size: 14px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--blue-500);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
  font-family: inherit;
}

.link-btn:hover {
  color: var(--blue-950);
}

.link-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
  text-decoration: none;
}

/* ================================
   OTP SCREEN STYLES (FULLY ROUNDED INPUTS)
=================================== */
.otp-info {
  text-align: center;
  margin-bottom: 30px;
  color: #666;
  line-height: 1.5;
  font-size: 14px;
}

.otp-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 30px;
  width: 100%;
}

.otp-digit {
  width: 50px !important;
  height: 50px !important;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  border: 2px solid #e1e1e1;
  border-radius: 50% !important; /* Fully rounded */
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  font-family: inherit;
  padding: 0;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(45, 191, 173, 0.1);
}

.otp-digit.error {
  border-color: #ff4444 !important;
  background-color: #fff5f5 !important;
}

.otp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

/* Success Screen */
.success-content {
  text-align: center;
  padding: 40px 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  margin: 0 auto 20px;
}

.success-content h3 {
  color: #10b981;
  margin-bottom: 10px;
}

.success-content p {
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--blue-500);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error States */
.error-message {
  color: #ff4444;
  font-size: 14px;
  margin-top: 8px;
  text-align: center;
  background: #fff5f5;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ffcccc;
}

.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Form Validation States */
.input-group input.error {
  border-color: #ff4444;
  background-color: #fff5f5;
}

.input-group input.error:focus {
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1);
}

/* Utilities */
.visually-hidden{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-drawer {
    max-width: 100%;
  }
  
  .auth-body {
    padding: 20px 16px;
  }
  
  .auth-screen form {
    max-width: calc(100vw - 72px); /* Account for drawer padding */
  }
  
  .success-content {
    max-width: calc(100vw - 72px);
  }
  
  .otp-digit {
    width: 45px !important;
    height: 45px !important;
    font-size: 18px;
  }
  
  .otp-inputs {
    gap: 8px;
  }
  
  .auth-screen h3 {
    font-size: 22px;
  }
  
  .otp-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .otp-actions .link-btn {
    text-align: center;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 12px;
  }
  
  .header-login-btn {
    padding: 0 12px;
    height: 32px;
    font-size: 13px;
  }
  
  .auth-body {
    padding: 20px 12px;
  }
  
  .auth-screen form {
    max-width: calc(100vw - 64px); /* Account for smaller drawer padding */
  }
  
  .success-content {
    max-width: calc(100vw - 64px);
  }
  
  .otp-inputs {
    gap: 6px;
  }
  
  .otp-digit {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px;
  }
}