/**
 * Share button for Promaren Blog
 * Single native share button (icon + text), monochrome style
 */

/* CSS Variables for share button */
.share-buttons-wrapper {
  --share-primary: 203 95% 42%;
  --share-primary-hex: #0c82d6;
  --share-foreground: 0 0% 13%;
  --share-foreground-hex: #212121;
  --share-background: 0 0% 100%;
  --share-background-hex: #ffffff;
  --share-muted: 0 0% 93%;
  --share-muted-hex: #e5e7eb;
  --share-muted-foreground: 0 0% 47%;
  --share-muted-foreground-hex: #757575;
  --share-radius: 0.5rem;
}

/* Wrapper: after article, before post navigation */
.share-buttons-wrapper {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--share-muted-hex, #e5e7eb);
  border-bottom: 1px solid var(--share-muted-hex, #e5e7eb);
}

/* Single native share button: icon + text */
.native-share-button {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  min-height: 44px;
  background-color: hsla(var(--share-primary, 203 95% 42%), 0.1);
  border: 1px solid hsla(var(--share-primary, 203 95% 42%), 0.3);
  border-radius: var(--share-radius, 0.5rem);
  color: hsl(var(--share-primary, 203 95% 42%));
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.native-share-button:hover {
  transform: translateY(-2px);
  background-color: hsla(var(--share-primary, 203 95% 42%), 0.2);
  border-color: hsl(var(--share-primary, 203 95% 42%));
  box-shadow: 0 4px 12px hsla(var(--share-primary, 203 95% 42%), 0.2);
}

.native-share-button:active {
  transform: translateY(0);
  background-color: hsla(var(--share-primary, 203 95% 42%), 0.3);
}

.native-share-button:focus {
  outline: 2px solid hsl(var(--share-primary, 203 95% 42%));
  outline-offset: 2px;
}

.native-share-button i {
  font-size: 1.125rem;
  width: 1.125rem;
  flex-shrink: 0;
}

.native-share-button-text {
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 576px) {
  .native-share-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .native-share-button i {
    font-size: 1rem;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .share-buttons-wrapper {
    border-color: hsla(0 0% 29%, 0.5);
  }
}

/* Copy notification toast */
.share-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--share-foreground-hex, #212121);
  color: var(--share-background-hex, #ffffff);
  padding: 0.75rem 1.5rem;
  border-radius: var(--share-radius, 0.5rem);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

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

@media (prefers-color-scheme: dark) {
  .share-toast {
    background-color: hsl(var(--background, 0 0% 10%));
    color: hsl(var(--foreground, 0 0% 100%));
  }
}
