/* ========================================
   VIZBL ADS — AUTH MODALS
   ======================================== */

/* --- Nav Auth Buttons Layout --- */
.nav-02__item--auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Modal Overlay --- */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

/* --- Modal Card --- */
.auth-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18),
              0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 40px 36px 32px;
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-overlay.is-open .auth-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- Close Button --- */
.auth-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  padding: 0;
}

.auth-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.auth-modal__close svg {
  width: 14px;
  height: 14px;
}

/* --- Modal Header --- */
.auth-modal__title {
  font-family: 'Playfair Display SC', Helvetica, serif;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
}

.auth-modal__subtitle {
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
}

/* --- Form --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- Input Group --- */
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-group label {
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.auth-input-group label .required {
  color: #ef4444;
  margin-left: 2px;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 15px;
  color: #1a1a2e;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #3558DA;
  box-shadow: 0 0 0 3px rgba(53, 88, 218, 0.12);
  background: #fff;
}

.auth-input::placeholder {
  color: #9ca3af;
}

/* --- Textarea --- */
.auth-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: 'Lexend', Helvetica, sans-serif;
  line-height: 1.5;
}

/* --- Password Toggle --- */
.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.auth-password-toggle:hover {
  color: #374151;
}

.auth-password-toggle svg {
  width: 20px;
  height: 20px;
}

.auth-input-wrapper .auth-input {
  padding-right: 44px;
}

/* --- Checkbox Group --- */
.auth-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #3558DA;
  flex-shrink: 0;
  cursor: pointer;
}

.auth-checkbox-group label {
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  cursor: pointer;
}

.auth-checkbox-group label a {
  color: #3558DA;
  text-decoration: none;
  font-weight: 600;
}

.auth-checkbox-group label a:hover {
  text-decoration: underline;
}

/* --- Submit Button --- */
.auth-submit {
  width: 100%;
  padding: 14px;
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #3558DA;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  margin-top: 4px;
}

.auth-submit:hover {
  background: #2f4fc3;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(53, 88, 218, 0.3);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Footer Link --- */
.auth-modal__footer {
  text-align: center;
  margin-top: 20px;
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 14px;
  color: #6b7280;
}

.auth-modal__footer a {
  color: #3558DA;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.auth-modal__footer a:hover {
  text-decoration: underline;
}

/* --- Error / Success Messages --- */
.auth-message {
  padding: 0;
  margin: 0;
  border-radius: 8px;
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}

.auth-message.is-visible {
  display: block;
  padding: 10px 14px;
  margin: -4px 0 0;
}

.auth-message--success.is-visible {
  padding: 24px 28px;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
  margin: 0;
}

.auth-modal--success {
  max-width: 520px;
}

.auth-modal--success .auth-modal__title {
  text-align: center;
  margin-bottom: 20px;
}

.auth-message--error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.auth-message--success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.auth-message a {
  color: inherit;
  font-weight: 600;
}

/* --- Password Match Error --- */
.auth-input--error {
  border-color: #ef4444 !important;
}

.auth-field-error {
  font-family: 'Lexend', Helvetica, sans-serif;
  font-size: 12px;
  color: #ef4444;
  margin-top: 2px;
  display: none;
}

.auth-field-error.is-visible {
  display: block;
}

/* --- Responsive --- */
@media (max-width: 500px) {
  .auth-modal {
    max-width: 100%;
    margin: 0 12px;
    padding: 32px 24px 24px;
    border-radius: 12px;
  }

  .auth-modal__title {
    font-size: 24px;
  }
}
