/* ============================================
   PASSWORD MODAL - BOH.SPA
   ============================================ */

.password-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

.password-modal-overlay.opacity-0 {
  opacity: 0;
  pointer-events: none;
}

/* Dim sheet while a centered confirm alert sits above (Forgot password). */
.password-modal-overlay.is-behind-alert {
  pointer-events: none;
}

.password-modal-overlay.is-behind-alert .password-modal-container {
  filter: brightness(0.92);
}

.password-modal-container {
  width: 100%;
  max-width: 500px;
  background: var(--boh-color-bg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  animation: bohPasswordSlideUp 0.4s ease;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

@keyframes bohPasswordSlideUp {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.password-modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--boh-color-bg);
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--boh-color-primary, #26564d);
}

.password-modal-content {
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  background: var(--boh-color-bg);
}

.password-info-box {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.info-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.info-text {
  font-size: 0.8125rem;
  color: #1e40af;
  line-height: 1.5;
  margin: 0;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.password-modal-content .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.password-modal-content .field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--boh-color-primary, #26564d);
}

.password-modal-content .field-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #212121;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-modal-content .field-input:focus {
  outline: none;
  border-color: var(--boh-color-primary, #26564d);
  box-shadow: 0 0 0 3px rgba(38, 86, 77, 0.12);
}

.password-modal-content .field-input::placeholder {
  color: #9e9e9e;
}

.password-input-wrapper {
  position: relative;
}

.password-input {
  padding-right: 2.5rem;
}

.toggle-password-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
}

.toggle-password-btn:hover {
  background: #f3f4f6;
}

.toggle-password-btn.active .eye-icon {
  color: var(--boh-color-primary, #26564d);
}

.eye-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  width: 100%;
  height: 0.25rem;
  background: #e5e7eb;
  border-radius: 0.25rem;
  overflow: hidden;
}

.strength-progress {
  height: 100%;
  width: 0;
  background: #e5e7eb;
  transition: width 0.25s ease, background-color 0.25s ease;
  border-radius: 0.25rem;
}

.strength-text {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  margin-top: 0.25rem;
}

.password-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-cancel-password,
.btn-save-password {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.btn-cancel-password {
  background: #fff;
  border: 1.5px solid var(--boh-color-primary, #26564d);
  color: var(--boh-color-primary, #26564d);
}

.btn-cancel-password:hover {
  background: #f3f6f5;
}

.btn-save-password {
  background: var(--boh-color-primary, #26564d);
  border: none;
  color: #fff;
}

.btn-save-password:hover {
  background: #1f463f;
}

.btn-save-password:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.forgot-password-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.btn-forgot-password {
  background: transparent;
  border: none;
  color: var(--boh-color-primary, #26564d);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.btn-forgot-password:hover {
  color: #1f463f;
}

@media (max-width: 640px) {
  .password-modal-overlay {
    padding: 0;
  }

  .password-modal-container {
    max-height: 100dvh;
  }

  .password-modal-content {
    padding: 1rem;
  }
}
