
:root {
  --hero-bg: #eef2f8;
}

/* Login Overlay - Hidden by default */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hero-bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* Gradient overlay to match login.php */
.login-overlay::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: min(44vw, 637px);
  height: 100%;
  background: linear-gradient(49.57deg, rgba(4,90,161,.14) 4.02%, rgba(0,97,255,.14) 51.97%);
  pointer-events: none;
}



/* Overlay Active State */
.login-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Hide page content when overlay is active - hide texts but keep header for close button */
body.login-active .site-header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

body.login-active main {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

body.login-active .chat-fab,
body.login-active .chat-widget {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

body.login-active {
  overflow: hidden;
}



/* Login Form Container - Centered */
.login-form-container {
  position: relative;
  z-index: 15;
  background: white;
  padding: 40px 35px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.6s ease-out 0.15s, transform 0.6s ease-out 0.15s;
  pointer-events: none;
}

.login-overlay.active .login-form-container {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Inline login panel (home hero) */
.inline-login-panel{
  position:fixed;
  right:3%;
  top:50%;
  z-index:120;
  opacity:0;
  visibility:hidden;
  transform:translateX(80px) translateY(-50%);
  transition:
    opacity .35s linear .20s,
    visibility .35s linear .20s,
    transform .40s linear .20s;
  pointer-events:none;
}
.inline-login-active .inline-login-panel{
  opacity:1;
  visibility:visible;
  transform:translateX(0) translateY(-50%);
  pointer-events:auto;
}
.login-form-container.inline{
  margin-right:0;
  box-shadow:0 28px 70px rgba(0,0,0,.16);
  opacity:0;
  transform:translate(40px, 10px) scale(.97);
  max-width:520px;
  padding:44px 40px;
  animation: cardSlideIn 0.7s ease-out both;
  transition:
    opacity .35s ease .28s,
    transform .35s ease .28s;
    
}
.inline-login-active .login-form-container.inline{
  opacity:1;
  transform:translate(0,0) scale(1);
  pointer-events:auto;
  width: 450px;
  height: auto;
}
.login-form-container.signup-card{display:none;}
.inline-mode-signup .login-card{display:none;}
.inline-mode-signup .signup-card{display:block;}
.input-group.two-col{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}

.login-form-container.signup-card{display:none;}
.inline-mode-signup .login-card{display:none;}
.inline-mode-signup .signup-card{display:block;}
.input-group.two-col{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateX(28px) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

/* Close Button */
.login-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 20;
}

.login-close-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.login-close-btn:active {
  transform: scale(0.95);
}

.login-close-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Logo Container */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo {
  width: 80px;
  height: 80px;
}

.logo img {
  width: 100%;
  height: 100%;
}

/* Clinic Name */
.clinic-name {
  text-align: center;
  color: #005daa;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}

/* Input Groups */
.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
  color: #1f2937;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
}

.input-group input::placeholder {
  color: #6b7280;
}

.input-group input:focus {
  border-color: #005daa;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 93, 170, 0.1);
}

/* Toggle Password Button */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.2s ease;
  border-radius: 4px;
  outline: none;
}

.toggle-password:hover {
  color: #005daa;
  background-color: rgba(0, 93, 170, 0.05);
}

.toggle-password:active {
  transform: translateY(-50%) scale(0.95);
}

.toggle-password:focus {
  outline: 2px solid rgba(0, 93, 170, 0.3);
  outline-offset: 2px;
}

.eye-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  pointer-events: none;
}

/* Form Links */
.form-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.form-links .link {
  color: #005daa;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

.form-links .link:hover {
  color: #004080;
  text-decoration: underline;
}

.separator {
  color: #6b7280;
  font-size: 12px;
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 16px;
  background-color: #005daa;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 93, 170, 0.3);
  font-family: inherit;
}

.login-btn:hover {
  background-color: #004080;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 93, 170, 0.4);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 93, 170, 0.3);
}

.login-btn:disabled {
  background-color: #9ca3af;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}

.alert-error {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-success {
  background-color: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  max-width: 400px;
  width: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-wrapper {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 320px;
}

.toast-left-border {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #22c55e;
  border-radius: 8px 0 0 8px;
}

.toast.error .toast-left-border {
  background: #ef4444;
}

.toast-icon-wrapper {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon {
  width: 32px;
  height: 32px;
  background: #22c55e;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
  font-family: Arial, sans-serif;
}

.toast.error .toast-icon-wrapper .toast-icon {
  background: #ef4444;
}

.toast.error .toast-icon-wrapper .toast-icon {
  font-size: 16px;
}

.toast.success .toast-icon-wrapper .toast-icon {
  font-size: 18px;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.toast-title {
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.toast-message {
  color: #6b7280;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: color 0.2s;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-close:hover {
  color: #374151;
}

.toast-close svg {
  width: 16px;
  height: 16px;
}

.toast-loading-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: #e5e7eb;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.toast-loading-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: #22c55e;
  transform: scaleX(0);
  transform-origin: left;
}

.toast.error .toast-loading-line::after {
  background: #ef4444;
}

.toast.show .toast-loading-line::after {
  animation: toastLoading 5s linear forwards;
}

@keyframes toastLoading {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dentist-image-wrapper {
    width: 40%;
  }
  
  .login-overlay {
    padding-right: 4%;
  }
}

@media (max-width: 768px) {
  .login-overlay {
    padding-right: 20px;
    padding-left: 20px;
    justify-content: center;
  }

  .login-overlay::before {
    display: none;
  }

  .dentist-image-wrapper {
    display: none;
  }

  .login-form-container {
    max-width: 100%;
    width: 100%;
    padding: 30px 25px;
  }

  .toast {
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .clinic-name {
    font-size: 20px;
  }

  .form-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .separator {
    display: none;
  }

  .login-form-container {
    padding: 25px 20px;
    border-radius: 8px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }
}
