/* Authentication UI Styles */

/* Auth Container */
.auth-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
}

/* Auth Button */
.auth-button {
  padding: 12px 24px;
  border: none;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--cta-bg, #ff8c7a);
  color: white;
  box-shadow: 0 2px 8px 0 rgba(255, 140, 122, 0.2);
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  font-family: "Poppins", sans-serif;
}

.auth-button:hover {
  background: var(--cta-bg-hover, #ff7a66);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 117, 102, 0.3);
}

.auth-button.anonymous {
  background: var(--cta-bg, #ff8c7a);
  color: white;
}

.auth-button.signed-in {
  background: var(--cta-bg, #ff8c7a);
  color: white;
}

/* When conversation exists, modify design slightly */
.auth-button.anonymous.has-conversation {
  background: white;
  color: var(--cta-bg, #ff8c7a);
  border: 2px solid var(--cta-bg, #ff8c7a);
}

.auth-button.anonymous.has-conversation:hover {
  background: #fff9f3;
  color: var(--cta-bg-hover, #ff7a66);
  border-color: var(--cta-bg-hover, #ff7a66);
}

/* User Menu */
.user-menu {
  position: fixed;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  min-width: 180px;
  z-index: 101;
  border: 1px solid #f0e8e0;
  overflow: hidden;
}

.menu-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  color: #444;
}

.menu-option:hover {
  background-color: #fff9f3;
  color: var(--cta-bg, #ff8c7a);
}

/* Auth Modal */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease forwards;
}

.auth-modal {
  background: linear-gradient(180deg, #fff8f3 80%, #fbeee2 100%);
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
  animation: pop 0.4s ease-out forwards;
  position: relative;
}

.auth-modal h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #222;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-size: 1.5rem;
}

.auth-modal p {
  margin-bottom: 24px;
  color: #555;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid #f0e8e0;
}

.auth-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  transition: all 0.2s;
  font-family: "Poppins", sans-serif;
}

.auth-tab:hover {
  color: var(--cta-bg, #ff8c7a);
}

.auth-tab.active {
  color: var(--cta-bg, #ff8c7a);
  border-bottom: 2px solid var(--cta-bg, #ff8c7a);
}

/* Tab Content */
#signin-content,
#create-content {
  display: none;
}

#signin-content.active,
#create-content.active {
  display: block;
}

.hidden {
  display: none !important;
}

/* Auth Error and Success Messages */
.auth-error {
  background-color: #ffede8;
  color: #e53935;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
}

.auth-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #444;
  font-family: "Poppins", sans-serif;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #f0e8e0;
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  font-family: "Poppins", sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--cta-bg, #ff8c7a);
  box-shadow: 0 0 0 2px rgba(255, 140, 122, 0.2);
}

.form-help {
  font-size: 0.8rem;
  color: #888;
  margin-top: 6px;
  font-family: "Poppins", sans-serif;
}

/* SMS Disclaimer */
.sms-disclaimer {
  font-size: 0.7rem;
  color: #999;
  line-height: 1.3;
  margin: 12px 0;
  font-family: "Poppins", sans-serif;
  padding: 8px 10px;
  background-color: rgba(249, 249, 249, 0.5);
  border-radius: 8px;
}

.sms-disclaimer a {
  color: var(--cta-bg, #ff8c7a);
  text-decoration: none;
}

.sms-disclaimer a:hover {
  text-decoration: underline;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
}

.form-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
}

.form-actions button[type="button"] {
  background-color: white;
  color: #555;
  border: 1px solid #f0e8e0;
}

.form-actions button[type="button"]:hover {
  background-color: #f9f9f9;
  border-color: #ddd;
}

.form-actions button[type="submit"] {
  background: var(--cta-bg, #ff8c7a);
  color: white;
  box-shadow: 0 2px 8px 0 rgba(255, 140, 122, 0.2);
}

.form-actions button[type="submit"]:hover {
  background: var(--cta-bg-hover, #ff7a66);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 117, 102, 0.3);
}

.auth-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: white;
  color: #444;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: fadeIn 0.3s forwards, fadeOut 0.3s forwards 3s;
  max-width: 300px;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  border-left: 4px solid var(--cta-bg, #ff8c7a);
}

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

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

@keyframes pop {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .auth-container {
    top: 12px;
    right: 12px;
  }
  
  .auth-button {
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: 14px;
  }
  
  .auth-modal {
    padding: 24px;
    margin: 0 16px;
    max-width: calc(100% - 32px);
  }
  
  .auth-modal h2 {
    font-size: 1.8rem;
  }
  
  .close-modal {
    top: 12px;
    right: 12px;
    font-size: 20px;
    width: 28px;
    height: 28px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions button {
    width: 100%;
  }
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.close-modal:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}
