/* Auth Modal */
.auth-modal {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.auth-modal.active {
  display: flex !important;
  opacity: 1;
}

.auth-modal-content {
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 40px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: authModalSlideIn 0.3s ease;
  margin-top: 60px;
}

@keyframes authModalSlideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.auth-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-close:hover {
  background: var(--muted);
  color: var(--text-primary);
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: -2px;
}

.auth-tab:hover {
  color: var(--text-primary);
  background: var(--muted);
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-tab i {
  font-size: 16px;
}

/* Forms */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form-forgot {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Terms checkbox */
.auth-terms-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.auth-terms-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.auth-terms-checkbox label {
  position: static;
  transform: none;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-terms-checkbox label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-terms-checkbox label a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Register form grid layout */
#registerFormElement .auth-form-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

#registerFormElement .auth-form-fields .auth-form-group {
  margin-bottom: 0;
}

.auth-form-group {
  margin-bottom: 10px;
  position: relative;
}

#registerFormElement .auth-form-fields .auth-form-group {
  margin-bottom: 0;
}

#loginFormElement .auth-form-group {
  margin-bottom: 0;
}

.auth-form-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: all 0.2s;
  background: var(--bg-card);
  padding: 0 4px;
  z-index: 1;
}

.auth-form-group input:focus ~ label,
.auth-form-group input:not(:placeholder-shown) ~ label,
.auth-form-group input:not([value=""]) ~ label,
.auth-form-group label.active {
  top: -8px;
  transform: translateY(0) scale(0.9);
  font-size: 13px;
  color: var(--primary);
}

.auth-form-group input {
  width: 100%;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.2s;
  box-sizing: border-box;
}

/* Login form - same as register */
#loginFormElement {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#loginFormElement .auth-form-group {
  margin-bottom: 0;
}

#loginFormElement .auth-form-group input {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0;
}

.auth-form-group input::placeholder {
  color: transparent;
}


.auth-form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(166, 139, 111, 0.1);
}

.auth-form-group input:focus ~ label {
  color: var(--primary);
}

.auth-form-group small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.auth-form-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #957d65;
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-submit-btn:hover {
  background: #957d65;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(166, 139, 111, 0.3);
}

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

.auth-submit-btn i {
  font-size: 16px;
}

/* Flash Messages */
.auth-flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.auth-flash-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.auth-flash-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Toast Notifications - Sayfa geneli, orta alttan */
.auth-toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  align-items: center;
  width: 90%;
  max-width: 500px;
}

.auth-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  backdrop-filter: blur(10px);
  animation: authToastSlideUp 0.4s ease-out forwards;
}

.auth-toast-success {
  background: #22c55e;
  border-color: #16a34a;
  color: white;
}

.auth-toast-error {
  background: #ef4444;
  border-color: #dc2626;
  color: white;
}

.auth-toast-message {
  flex: 1;
  color: white;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-toast-success .auth-toast-message {
  color: white;
}

.auth-toast-error .auth-toast-message {
  color: white;
}

.auth-toast-message i {
  font-size: 18px;
  flex-shrink: 0;
}

.auth-toast-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.auth-toast-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

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

/* Responsive */
@media (max-width: 768px) {
  .auth-modal-content {
    padding: 30px 20px;
    max-width: 100%;
    border-radius: 12px;
  }
  
  .auth-tabs {
    gap: 5px;
  }
  
  .auth-tab {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  /* Register form: 1 column on mobile */
  #registerFormElement .auth-form-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  #registerFormElement .auth-form-fields .auth-form-group {
    margin-bottom: 0;
  }
  
  /* Login form spacing on mobile */
  #loginFormElement .auth-form-group {
    margin-bottom: 0;
  }
  
  #loginFormElement .auth-form-group input {
    margin-bottom: 0;
  }
  
  .auth-tab span {
    display: none;
  }
  
  .auth-tab i {
    font-size: 18px;
  }
  
  .auth-form h2 {
    font-size: 20px;
  }
  
  .auth-modal-content {
    margin-top: 50px;
  }
  
  .auth-toast-container {
    bottom: 20px;
    max-width: calc(100% - 40px);
    width: calc(100% - 40px);
  }
  
  .auth-toast {
    padding: 14px 16px;
  }
  
  .auth-toast-message {
    font-size: 14px;
  }
  
  .auth-toast-close {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }
}

