/* ===========================================================
   EventWings Authentication Styles (Mobile Responsive)
   Safe: does NOT modify any existing layout or styles
=========================================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content.auth-box {
  width: 380px;
  max-width: 92%;
  background: #fff;
  padding: 28px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: fadeIn .3s ease;
  position: relative;
}

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

/* Close Button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  cursor: pointer;
  font-size: 22px;
  color: #555;
}

/* Back Button (for sub modals) */
.auth-back {
  position: absolute;
  top: 12px;
  left: 14px;
  cursor: pointer;
  font-size: 16px;
  color: #007bff;
}

/* Titles */
.auth-title {
  text-align: center;
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 700;
}

.auth-sub {
  text-align: center;
  margin-bottom: 20px;
  color: #666;
}

/* Button List Layout */
.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Buttons */
.auth-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: #e9ecef;
  transition: 0.25s;
}

.auth-btn:hover {
  background: #d6d6d6;
}

/* Primary Theme Button */
.auth-btn.primary {
  background: #007bff;
  color: #fff;
}

.auth-btn.primary:hover {
  background: #0059c9;
}

/* Forms */
.auth-box form input {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 14px;
  font-size: 15px;
}

.auth-note {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

.auth-note a {
  color: #007bff;
  text-decoration: underline;
}

/* OTP Block */
#otpBlock {
  margin-top: 12px;
}

/* Logout Modal */
#logoutModal button {
  margin-top: 10px;
}

/* Prevent modal reposition flicker */
.modal {
  will-change: opacity, transform;
}


/* Mobile Optimization */
@media(max-width: 480px) {
  .modal-content.auth-box {
    width: 92%;
    padding: 20px;
  }

  .auth-buttons .auth-btn {
    font-size: 14px;
    padding: 12px;
  }
}
