/**
 * LSM Modal Popup Styles - Exact match to login/signup forms
 * Unique classes to prevent conflicts
 */

/* Modal Wrapper */
.lsm-modal-popup-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lsm-modal-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lsm-modal-popup-wrapper.lsm-modal-popup-active .lsm-modal-popup-overlay {
  opacity: 1;
}

/* Main Container - Same as full page design */
.lsm-modal-popup-main {
  position: relative;
  background: white;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  max-height: 850px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  display: flex;
  flex-direction: column;
}

.lsm-modal-popup-wrapper.lsm-modal-popup-active .lsm-modal-popup-main {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close Button */
.lsm-modal-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lsm-modal-popup-close:hover {
  background: #f1f5f9;
  color: #132c4b;
  transform: rotate(90deg);
}

/* Inner Container */
.lsm-modal-popup-inner {
  display: flex;
  flex-direction: row;
  height: 100%;
  position: relative;
}

/* Tabs Navigation */
.lsm-modal-popup-tabs-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 0;
}

.lsm-modal-popup-tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: #64748b;
  transition: all 0.3s;
  position: relative;
  top: 2px;
}

.lsm-modal-popup-tab-btn:hover {
  color: #132c4b;
  background: rgba(19, 44, 75, 0.05);
}

.lsm-modal-popup-tab-btn.lsm-modal-popup-tab-active {
  color: #132c4b;
  border-bottom-color: #132c4b;
  background: white;
}

/* Content Wrapper */
.lsm-modal-popup-content-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  padding-top: 60px; /* Space for tabs */
}

/* Brand Section (Left) - Exact match to login/signup forms */
.lsm-modal-popup-brand {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  width: 41.666667%;
  overflow: hidden;
  z-index: 20;
}

@media (min-width: 1024px) {
  .lsm-modal-popup-brand {
    display: flex;
  }
}

.lsm-modal-popup-brand-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #132c4b;
  overflow: hidden;
  z-index: 0;
}

.lsm-modal-popup-brand-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, #1e3a5f, #132c4b, #0a192f);
}

.lsm-modal-popup-brand-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0.1;
}

.lsm-modal-popup-brand-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.lsm-modal-popup-brand-top {
  flex: 1;
}

.lsm-modal-popup-brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.lsm-modal-popup-logo-img {
  height: 40px;
  object-fit: contain;
}

.lsm-modal-popup-brand-text {
  transition: opacity 0.5s;
}

.lsm-modal-popup-brand-heading {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff;
}

.lsm-modal-popup-brand-desc {
  color: rgba(219, 234, 254, 0.9);
  font-size: 18px;
  line-height: 1.75;
  text-shadow: -1px -1px 0 rgba(255,255,255,0.3), 1px -1px 0 rgba(255,255,255,0.3), -1px 1px 0 rgba(255,255,255,0.3), 1px 1px 0 rgba(255,255,255,0.3);
}

.lsm-modal-popup-brand-bottom {
  position: relative;
  z-index: 10;
}

.lsm-modal-popup-brand-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: rgba(191, 219, 254, 0.8);
}

.lsm-modal-popup-brand-separator {
  width: 4px;
  height: 4px;
  background: rgba(191, 219, 254, 0.5);
  border-radius: 50%;
}

/* Form Section (Right) */
.lsm-modal-popup-form-section {
  flex: 1;
  background: white;
  overflow-y: auto;
  position: relative;
}

.lsm-modal-popup-form-section::-webkit-scrollbar {
  width: 6px;
}

.lsm-modal-popup-form-section::-webkit-scrollbar-track {
  background: transparent;
}

.lsm-modal-popup-form-section::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 20px;
}

.lsm-modal-popup-form-section:hover::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
}

.lsm-modal-popup-form-scroll {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 48px 48px;
}

.lsm-modal-popup-form-inner {
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
}

/* Form Header */
.lsm-modal-popup-form-header {
  margin-bottom: 24px;
  text-align: center;
}

.lsm-modal-popup-form-title {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: -0.025em;
}

.lsm-modal-popup-form-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* Messages */
.lsm-modal-popup-message {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 3px;
  font-size: 14px;
}

.lsm-modal-popup-message-hidden {
  display: none;
}

.lsm-modal-popup-message.lsm-modal-popup-message-success {
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.lsm-modal-popup-message.lsm-modal-popup-message-error {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

/* Form */
.lsm-modal-popup-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lsm-modal-popup-form > .lsm-modal-popup-field:first-child {
  margin-top: 0;
}

/* Form Fields */
.lsm-modal-popup-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lsm-modal-popup-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .lsm-modal-popup-field-row {
    grid-template-columns: 1fr;
  }
}

.lsm-modal-popup-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.lsm-modal-popup-input-container {
  position: relative;
}

.lsm-modal-popup-input-icon {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  padding-left: 12px;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.lsm-modal-popup-input {
  width: 100%;
  padding: 10px 12px 10px 35px;
  border: 1px solid #cbd5e1;
  background: white;
  font-size: 15px;
  color: #0f172a;
  border-radius: 3px;
  transition: all 0.2s;
}

/* Ensure 35px padding from left for all inputs */
input.lsm-modal-popup-input {
  padding-left: 40px !important;
}
.S9gUrf-YoZ4jf {
  padding-left: 28px;
}

.lsm-modal-popup-input::placeholder {
  color: #94a3b8;
}

.lsm-modal-popup-input:focus {
  outline: none;
  border-color: #132c4b;
  box-shadow: 0 0 0 3px rgba(19, 44, 75, 0.1);
}

.lsm-modal-popup-field-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.lsm-modal-popup-link {
  font-size: 13px;
  font-weight: 500;
  color: #132c4b;
  text-decoration: none;
}

.lsm-modal-popup-link:hover {
  text-decoration: underline;
  color: #1e40af;
}

/* Submit Button */
.lsm-modal-popup-submit-btn {
  width: 100%;
  background: #132c4b;
  color: white;
  font-weight: 600;
  padding: 12px 16px;
  border: none;
  border-radius: 3px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.lsm-modal-popup-submit-btn:hover {
  background: #0f233d;
}

.lsm-modal-popup-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #132c4b;
}

.lsm-modal-popup-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Divider */
.lsm-modal-popup-divider {
  position: relative;
  margin: 24px 0;
}

.lsm-modal-popup-divider-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.lsm-modal-popup-divider-text {
  position: relative;
  display: flex;
  justify-content: center;
}

.lsm-modal-popup-divider-text span {
  background: white;
  padding: 0 16px;
  font-size: 14px;
  color: #94a3b8;
}

/* Google Sign In - Full Width */
.lsm-modal-popup-google {
  width: 100% !important;
  margin-bottom: 20px;
  display: block;
}

/* Ensure Google Sign In button is full width */
.lsm-modal-popup-google > div,
.lsm-modal-popup-google iframe,
.lsm-modal-popup-google [role="button"] {
  width: 100% !important;
  max-width: 100% !important;
}

/* Google Sign In button wrapper - full width */
.lsm-modal-popup-google div[data-g_id] {
  width: 100% !important;
  display: block;
}

/* Force Google button to be full width */
.lsm-modal-popup-google .g_id_signin {
  width: 100% !important;
}

/* Ensure any nested elements are full width */
.lsm-modal-popup-google * {
  max-width: 100% !important;
}

/* Target Google's specific button container */
.lsm-modal-popup-google div[id^="g_id_"],
.lsm-modal-popup-google div[class*="g_id_"] {
  width: 100% !important;
  display: block;
}

/* Switch Link */
.lsm-modal-popup-switch {
  text-align: center;
  margin-top: 24px;
  padding-bottom: 16px;
}

.lsm-modal-popup-switch-text {
  font-size: 14px;
  color: #475569;
  margin: 0;
}

.lsm-modal-popup-switch-link {
  font-weight: 600;
  color: #132c4b;
  text-decoration: none;
  margin-left: 4px;
  cursor: pointer;
}

.lsm-modal-popup-switch-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* Tab Panels */
.lsm-modal-popup-tab-panel {
  display: none;
  animation: lsm-modal-popup-fadeIn 0.3s ease;
}

.lsm-modal-popup-tab-panel.lsm-modal-popup-tab-panel-active {
  display: block;
}

@keyframes lsm-modal-popup-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .lsm-modal-popup-main {
    height: 95vh;
    max-height: none;
  }
  
  .lsm-modal-popup-content-wrapper {
    padding-top: 60px;
  }
  
  .lsm-modal-popup-form-scroll {
    padding: 24px 32px 32px;
  }
}

@media (max-width: 768px) {
  .lsm-modal-popup-wrapper {
    padding: 10px;
  }
  
  .lsm-modal-popup-main {
    max-width: 100%;
    height: 95vh;
  }
  
  .lsm-modal-popup-tabs-nav {
    padding: 0 10px;
  }
  
  .lsm-modal-popup-tab-btn {
    padding: 12px 10px;
    font-size: 14px;
  }
  
  .lsm-modal-popup-form-scroll {
    padding: 20px 24px 24px;
  }
}

