/* WP Smith — Social Share Buttons */

.wp-smith-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
}

.wp-smith-share__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wp--preset--color--contrast, #1c2b3a);
  margin-right: 4px;
}

.wp-smith-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--wp--preset--color--base, #f4f4f4);
  color: var(--wp--preset--color--contrast, #1c2b3a);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  line-height: 1;
}

.wp-smith-share__btn:hover,
.wp-smith-share__btn:focus-visible {
  background: var(--wp--preset--color--contrast, #1c2b3a);
  color: var(--wp--preset--color--base, #ffffff);
  outline: none;
}

.wp-smith-share__btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--vivid-amber-warm-yellow, #d97706);
  outline-offset: 2px;
}

/* Per-network accent colours on hover */
.wp-smith-share__btn--x:hover {
  background: #000;
  color: #fff;
}
.wp-smith-share__btn--facebook:hover {
  background: #1877f2;
  color: #fff;
}
.wp-smith-share__btn--linkedin:hover {
  background: #0a66c2;
  color: #fff;
}
.wp-smith-share__btn--reddit:hover {
  background: #ff4500;
  color: #fff;
}
.wp-smith-share__btn--bluesky:hover {
  background: #0085ff;
  color: #fff;
}
.wp-smith-share__btn--pinterest:hover {
  background: #e60023;
  color: #fff;
}
.wp-smith-share__btn--mastodon:hover {
  background: #6364ff;
  color: #fff;
}
.wp-smith-share__btn--email:hover {
  background: #34495e;
  color: #fff;
}
.wp-smith-share__btn--copy:hover {
  background: #27ae60;
  color: #fff;
}

/* Icon-only on small screens */
@media (max-width: 480px) {
  .wp-smith-share__text {
    display: none;
  }
  .wp-smith-share__btn {
    padding: 8px;
  }
  .wp-smith-share__label {
    font-size: 0.8125rem;
  }
}

/* Mastodon instance picker dialog */
#wp-smith-mastodon-dialog {
  border: 1px solid var(--wp--preset--color--contrast-2, #ddd);
  border-radius: 8px;
  padding: 24px;
  max-width: 380px;
  width: calc(100vw - 48px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  background: var(--wp--preset--color--base, #fff);
  color: var(--wp--preset--color--contrast, #1c2b3a);
}

#wp-smith-mastodon-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.wp-smith-mastodon-form label {
  display: block;
  font-size: 0.875rem;
  margin: 12px 0 4px;
}

.wp-smith-mastodon-form input[type="url"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--wp--preset--color--contrast-2, #ccc);
  border-radius: 4px;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.wp-smith-mastodon-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.wp-smith-mastodon-go {
  flex: 1;
  padding: 8px;
  background: var(--wp--preset--color--contrast, #1c2b3a);
  color: var(--wp--preset--color--base, #fff);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

.wp-smith-mastodon-go:hover {
  opacity: 0.88;
}

.wp-smith-mastodon-cancel {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--wp--preset--color--contrast-2, #ccc);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .wp-smith-share__btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f0f0f0;
    border-color: rgba(255, 255, 255, 0.12);
  }
  .wp-smith-share__label {
    color: #f0f0f0;
  }
}
