/* ─── Auth Bar ─────────────────────────────────────────── */
#tb-auth-bar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 900;
  padding: 12px 20px;
}

.tb-auth-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tb-auth-btn {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tb-auth-btn:hover {
  border-color: #E91E8C;
  color: #E91E8C;
}

.tb-auth-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #888;
  padding: 7px 12px;
}

.tb-auth-btn-ghost:hover {
  color: #E91E8C;
  border-color: transparent;
}

#tb-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.tb-user-name {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  color: #555;
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Modal Overlay ───────────────────────────────────── */
.tb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.tb-modal {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 400px;
  margin: 16px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.tb-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #ccc;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.tb-modal-close:hover {
  color: #888;
}

.tb-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: #333;
}

/* ─── Tabs ────────────────────────────────────────────── */
.tb-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.tb-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #aaa;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tb-tab.active {
  color: #333;
  border-bottom-color: #E91E8C;
}

.tb-tab:hover {
  color: #333;
}

/* ─── Error ───────────────────────────────────────────── */
.tb-auth-error {
  background: #fff0f0;
  color: #c0392b;
  font-size: 0.8rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.4;
}

/* ─── Google Button ───────────────────────────────────── */
.tb-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tb-google-btn:hover {
  border-color: #bbb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ─── Divider ─────────────────────────────────────────── */
.tb-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  gap: 12px;
}

.tb-divider::before,
.tb-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}

.tb-divider span {
  font-size: 0.75rem;
  color: #bbb;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ─── Email Form ──────────────────────────────────────── */
.tb-email-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tb-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #888;
  margin-bottom: 5px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.tb-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  outline: none;
  transition: border-color 0.15s ease;
}

.tb-field input:focus {
  border-color: #E91E8C;
}

.tb-field input::placeholder {
  color: #ccc;
}

.tb-submit-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #E91E8C;
  color: #fff;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 4px;
}

.tb-submit-btn:hover {
  background: #d1177d;
}

/* ─── Footer Links ────────────────────────────────────── */
.tb-auth-footer {
  text-align: center;
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 16px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.tb-auth-footer a {
  color: #E91E8C;
  text-decoration: none;
  font-weight: 500;
}

.tb-auth-footer a:hover {
  text-decoration: underline;
}

/* ─── Reset Form ──────────────────────────────────────── */
.tb-reset-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tb-reset-text {
  font-size: 0.82rem;
  color: #888;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.4;
}

/* ─── Not Configured ──────────────────────────────────── */
.tb-not-configured {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  color: #888;
  line-height: 1.6;
}

.tb-not-configured pre {
  background: #f5f5f5;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.75rem;
  overflow-x: auto;
  margin: 12px 0;
  color: #555;
}

.tb-not-configured a {
  color: #E91E8C;
}

/* ─── Save indicator ──────────────────────────────────── */
.tb-save-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  margin-bottom: 16px;
}

.tb-save-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.85rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
}

.tb-save-bar input::placeholder { color: #ccc; }

.tb-save-btn {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background: #E91E8C;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.tb-save-btn:hover { background: #d1177d; }

.tb-save-btn:disabled {
  background: #ddd;
  cursor: default;
}

.tb-share-btn {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tb-share-btn:hover {
  border-color: #E91E8C;
  color: #E91E8C;
}

/* ─── Saved items list ────────────────────────────────── */
.tb-saved-list {
  margin-bottom: 20px;
}

.tb-saved-list summary {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  color: #888;
  cursor: pointer;
  padding: 8px 0;
  font-weight: 500;
}

.tb-saved-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  margin-top: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.tb-saved-item:hover {
  border-color: #E91E8C;
}

.tb-saved-item-name {
  flex: 1;
  font-size: 0.82rem;
  color: #333;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.tb-saved-item-date {
  font-size: 0.72rem;
  color: #bbb;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.tb-saved-item-delete {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
}

.tb-saved-item-delete:hover {
  color: #e74c3c;
}

/* ─── Toast ───────────────────────────────────────────── */
.tb-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  padding: 10px 20px;
  border-radius: 10px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
  pointer-events: none;
}

.tb-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  .tb-modal {
    padding: 28px 20px 24px;
    border-radius: 12px;
    margin: 12px;
  }

  #tb-auth-bar {
    padding: 8px 12px;
  }

  .tb-auth-btn {
    font-size: 0.78rem;
    padding: 6px 14px;
  }

  .tb-user-name {
    max-width: 100px;
    font-size: 0.78rem;
  }
}
