/* Login Modal Styles */
/* Matching the paywall modal design with two-column layout */

/* Modal Entry Animation */
@keyframes loginModalEnter {
  from { 
    opacity: 0; 
    transform: scale(0.98) translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

/* Overlay */
#LoginModal.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  overflow: auto;
}

#LoginModal.login-modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
}

/* Modal Dialog Container */
.login-modal-dialog {
  width: 100%;
  max-width: 940px;
  margin: 20px;
  animation: loginModalEnter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Modal Content - Two Column Layout */
.login-modal-content {
  background-color: #fff;
  border-radius: 2px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  min-height: 600px;
}

/* Close Button */
.login-modal-header {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 50;
}

.login-modal-header .close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #6b7280;
  transition: color 0.2s ease, transform 0.3s ease;
}

.login-modal-header .close:hover {
  color: #374151;
  transform: rotate(90deg);
}

.login-modal-header .close svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Left Branding Column */
.login-modal-branding {
  display: none;
  width: 41.666%;
  position: relative;
  background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #1f2937 100%);
  overflow: hidden;
}

.login-modal-branding-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: transform 8s ease-out;
}

.login-modal-content:hover .login-modal-branding-image {
  transform: scale(1.1);
}

.login-modal-branding-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.login-modal-branding-logo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 20;
}

.login-modal-branding-logo img {
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(0,0,0,0.3));
  transition: filter 0.5s ease;
}

.login-modal-branding-logo img:hover {
  filter: drop-shadow(0 10px 8px rgba(0,0,0,0.3)) brightness(1.1);
}

/* Right Form Column */
.login-modal-body {
  position: relative;
  width: 100%;
  min-height: 500px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Form wrapper */
.login-modal-form-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
}

/* Desktop: Show branding column */
@media (min-width: 768px) {
  .login-modal-branding {
    display: block;
  }
  
  .login-modal-body {
    width: 58.333%;
  }
}

/* Mobile: Full screen layout */
@media (max-width: 767px) {
  #LoginModal.login-modal.show {
    align-items: stretch;
  }
  
  .login-modal-dialog {
    margin: 0;
    max-width: none;
    height: 100%;
    animation: none;
  }
  
  .login-modal-content {
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .login-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  
  .login-modal-form-wrapper {
    padding: 30px 20px;
  }
  
  /* Larger close button on mobile */
  .login-modal-header {
    top: 12px;
    right: 12px;
  }
  
  .login-modal-header .close {
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
  }
  
  .login-modal-header .close svg {
    width: 28px;
    height: 28px;
  }
}

/* Form styling within modal */
.login-modal-form-wrapper .form-item {
  margin-bottom: 0;
}

.login-modal-form-wrapper .messages {
  margin-bottom: 20px;
}
