/* Sanctid Auth UI — shared styles */

.sanctid-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.sanctid-auth-modal {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  margin: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.sanctid-auth-modal.dark {
  background: #1a1a2e;
  color: #f5f0eb;
}

.sanctid-auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  line-height: 1;
  padding: 0.25rem;
}

.sanctid-auth-close:hover {
  opacity: 1;
}

.sanctid-auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.sanctid-auth-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.sanctid-auth-modal.dark .sanctid-auth-subtitle {
  color: rgba(245, 240, 235, 0.5);
}

/* Form fields */
.sanctid-auth-field {
  margin-bottom: 1rem;
}

.sanctid-auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.sanctid-auth-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.sanctid-auth-input:focus {
  outline: none;
  border-color: #2980b9;
  box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.15);
}

.sanctid-auth-modal.dark .sanctid-auth-input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f5f0eb;
}

.sanctid-auth-modal.dark .sanctid-auth-input:focus {
  border-color: #c45b28;
  box-shadow: 0 0 0 2px rgba(196, 91, 40, 0.2);
}

/* Buttons */
.sanctid-auth-btn {
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.sanctid-auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sanctid-auth-btn-primary {
  background: #2980b9;
  color: #fff;
}

.sanctid-auth-btn-primary:hover:not(:disabled) {
  background: #2472a4;
}

.sanctid-auth-modal.dark .sanctid-auth-btn-primary {
  background: #c45b28;
}

.sanctid-auth-modal.dark .sanctid-auth-btn-primary:hover:not(:disabled) {
  background: #a84b20;
}

/* OAuth buttons */
.sanctid-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.8rem;
  color: #999;
}

.sanctid-auth-divider::before,
.sanctid-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd;
}

.sanctid-auth-modal.dark .sanctid-auth-divider::before,
.sanctid-auth-modal.dark .sanctid-auth-divider::after {
  background: rgba(255, 255, 255, 0.1);
}

.sanctid-auth-oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 0.5rem;
}

.sanctid-auth-oauth-btn:hover {
  background: #f5f5f5;
}

.sanctid-auth-modal.dark .sanctid-auth-oauth-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f5f0eb;
}

.sanctid-auth-modal.dark .sanctid-auth-oauth-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sanctid-auth-oauth-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Error message */
.sanctid-auth-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.sanctid-auth-modal.dark .sanctid-auth-error {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
}

/* Toggle link */
.sanctid-auth-toggle {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: #666;
}

.sanctid-auth-toggle a,
.sanctid-auth-toggle button {
  color: #2980b9;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
}

.sanctid-auth-modal.dark .sanctid-auth-toggle {
  color: rgba(245, 240, 235, 0.5);
}

.sanctid-auth-modal.dark .sanctid-auth-toggle a,
.sanctid-auth-modal.dark .sanctid-auth-toggle button {
  color: #c45b28;
}

/* User menu (signed-in state) */
.sanctid-user-menu {
  position: relative;
  display: inline-block;
}

.sanctid-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.sanctid-user-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sanctid-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2980b9;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
}

.sanctid-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  padding: 0.5rem 0;
  z-index: 100;
}

.sanctid-user-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  color: #333;
}

.sanctid-user-dropdown-item:hover {
  background: #f5f5f5;
}

.sanctid-user-dropdown-sep {
  height: 1px;
  background: #eee;
  margin: 0.25rem 0;
}

.sanctid-user-dropdown-info {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #999;
}

/* Locked content */
.sanctid-locked-content {
  text-align: center;
  padding: 3rem 2rem;
  border: 1px dashed #ddd;
  border-radius: 8px;
  background: #fafafa;
}

.sanctid-locked-content.dark {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.sanctid-locked-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.sanctid-locked-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.sanctid-locked-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.25rem;
}

.sanctid-locked-content.dark .sanctid-locked-text {
  color: rgba(245, 240, 235, 0.5);
}

/* Nav sign-in button */
.sanctid-signin-btn {
  padding: 0.35rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.sanctid-signin-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Light theme nav button variant */
.sanctid-signin-btn.light {
  border-color: #ddd;
  color: #333;
}

.sanctid-signin-btn.light:hover {
  background: #f5f5f5;
}

/* Responsive */
@media (max-width: 640px) {
  .sanctid-auth-modal {
    margin: 0.5rem;
    padding: 1.5rem;
  }
}
