/* ============================================================
   FORMS ADDITIONAL
   ============================================================ */

/* Password toggle button positioning */
.password-toggle {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  z-index: 1;
}

.password-toggle:hover {
  color: var(--color-text-primary);
}

/* Input with toggle — needs extra padding */
input[type="password"] + .password-toggle ~ input,
div:has(.password-toggle) > input {
  padding-right: var(--space-10);
}

div:has(.password-toggle) > input[type="password"],
div:has(.password-toggle) > input[type="text"] {
  padding-right: var(--space-10);
}

/* Checkbox custom */
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}

/* Alert messages in forms */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  border: 1px solid;
}

.alert-success {
  background: #f0faf5;
  border-color: #b8e8d4;
  color: var(--color-success);
}

.alert-error {
  background: #fff5f5;
  border-color: #f5c8c8;
  color: var(--color-error);
}

.alert-info {
  background: #eef4ff;
  border-color: #c8d9f5;
  color: var(--color-info);
}

/* Type selector responsive */
@media (max-width: 480px) {
  .type-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Comment form input */
.comment-submit-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.comment-submit-btn:hover {
  background: var(--color-accent-dark);
  transform: scale(1.05);
}

/* Tags input */
.tags-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  transition: border-color var(--transition-fast);
  min-height: 44px;
  cursor: text;
}

.tags-input-wrapper:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.tag-pill-remove {
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
  transition: opacity var(--transition-fast);
}

.tag-pill-remove:hover {
  opacity: 1;
}

/* Form section divider */
.form-section-divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-6) 0;
}

/* Inline hint icons */
.form-label-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-normal);
  margin-left: var(--space-2);
}

/* File input visual styling */
.file-upload-zone input[type="file"].visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Responsive auth card */
@media (max-width: 480px) {
  .auth-card {
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: none;
    border: none;
    background: transparent;
  }

  .auth-page {
    align-items: flex-start;
    padding-top: var(--space-6);
  }
}

/* Notification dot on nav avatar */
.nav-avatar[data-has-notification]::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-error);
  border: 2px solid white;
}

/* Studies comment form on single post */
.studies-comments-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-10);
}

.studies-comments-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

#studies-comment-form {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

#studies-comment-form .comment-input {
  flex: 1;
}
