/* ---------- Auth UI & Profile Styles ---------- */
/* Backdrop for authentication modal */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Container inside modal */
.auth-modal > div {
  background: var(--panel);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 90%;
  max-width: 360px;
}

/* Input fields */
.auth-modal input {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.auth-modal input:focus {
  outline: none;
  border-color: var(--link);
}

/* Primary button style */
.auth-modal button,
#login-btn,
#login-google,
.comment-actions button,
.comment-delete {
  cursor: pointer;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0.25rem;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  background: #007bff;
  color: #fff;
  transition: background 0.2s;
}
.auth-modal button:hover,
#login-btn:hover,
#login-google:hover,
.comment-actions button:hover,
.comment-delete:hover {
  background: #0056b3;
}

/* Secondary/link style */
.auth-modal .auth-toggle a,
.auth-modal .auth-toggle button {
  background: #f1f1f1;
  color: #333;
}

/* Toggle between login/register links */
.auth-modal .auth-toggle {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
}
.auth-modal .auth-toggle a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}
.auth-modal .auth-toggle a:hover {
  text-decoration: underline;
}

/* Inline error messages */
.form-error {
  color: #d9534f;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Profile information next to sign-out */
.profile-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  font-weight: 500;
}
.profile-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s;
}
.profile-info img:hover {
  transform: scale(1.1);
}

/* ---------- Comments List Styles ---------- */
.comment-entry {
  display: flex;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}
.comment-entry:last-child {
  border-bottom: none;
}
.comment-entry .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.comment-entry .comment-body {
  margin-left: 1rem;
  flex: 1;
}
.comment-entry .comment-body strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}
.comment-entry .comment-body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.comment-delete {
  margin-left: auto;
  background: #dc3545;
}
.comment-delete:hover {
  background: #bd2130;
}

/* ---------- GIF Modal Styles ---------- */
#gif-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
#gif-modal > div {
  background: var(--panel);
  padding: 1rem;
  border-radius: 6px;
  max-width: 720px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
}
#gif-modal input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#gif-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}
#gif-results img {
  width: 100%;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.1s ease-in;
}
#gif-results img:hover {
  transform: scale(1.05);
}
#gif-close-btn {
  margin-top: 0.75rem;
  background: #6c757d;
  color: #fff;
}
#gif-close-btn:hover {
  background: #5a6268;
}
