/**
 * Tools Sharing Styles - CreatorFlow
 * Eye-catching, mobile-first design
 * Brand: #000000 (black), #d1fe17 (lime), NO box-shadows
 */

/* ============================================
   HERO SHARE BAR (Tools Hub - Top of page)
   Compact, eye-catching bar below hero
   ============================================ */
.hero-share-bar {
    background: #000000;
    padding: 1rem 1.5rem;
    margin-top: 2.5rem;
    border-radius: 1rem;
}

.hero-share-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 100%;
}

.hero-share-bar__text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-share-bar__text svg {
    color: #d1fe17;
    flex-shrink: 0;
}

.hero-share-bar__buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hero-share-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    border: none;
    min-height: 40px;
}

.hero-share-bar__btn--primary {
    background: #d1fe17;
    color: #000000;
}

.hero-share-bar__btn--primary:hover {
    background: #bde615;
}

.hero-share-bar__btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-share-bar__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-share-bar__btn.copied {
    background: #d1fe17 !important;
    color: #000000 !important;
    border-color: #d1fe17 !important;
}

.hero-share-bar__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Mobile: Stack vertically */
@media (max-width: 640px) {
    .hero-share-bar {
        padding: 1rem;
    }

    .hero-share-bar__inner {
        flex-direction: column;
        text-align: center;
        gap: 0.875rem;
    }

    .hero-share-bar__text {
        justify-content: center;
        font-size: 0.875rem;
    }

    .hero-share-bar__buttons {
        width: 100%;
    }

    .hero-share-bar__btn {
        flex: 1;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .hero-share-bar__btn .btn-text {
        display: none;
    }

    .hero-share-bar__btn {
        padding: 0.75rem;
        min-width: 44px;
    }
}

/* ============================================
   TOOL SHARE CARD (Individual Tools)
   Visually distinct card in results area
   ============================================ */
.tool-share-card {
    margin-top: 1.5rem;
    background: #000000;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tool-share-card__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tool-share-card__icon {
    width: 40px;
    height: 40px;
    background: #d1fe17;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-share-card__icon svg {
    width: 20px;
    height: 20px;
    color: #000000;
}

.tool-share-card__text {
    color: #ffffff;
}

.tool-share-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.125rem 0;
}

.tool-share-card__subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.tool-share-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tool-share-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    border: none;
    min-height: 40px;
}

.tool-share-card__btn--primary {
    background: #d1fe17;
    color: #000000;
}

.tool-share-card__btn--primary:hover {
    background: #bde615;
}

.tool-share-card__btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-share-card__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.tool-share-card__btn.copied {
    background: #d1fe17 !important;
    color: #000000 !important;
}

.tool-share-card__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Mobile: Stack card layout */
@media (max-width: 640px) {
    .tool-share-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .tool-share-card__content {
        flex-direction: column;
    }

    .tool-share-card__actions {
        width: 100%;
    }

    .tool-share-card__btn {
        flex: 1;
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .tool-share-card__btn .btn-text {
        display: none;
    }

    .tool-share-card__btn {
        padding: 0.75rem;
        min-width: 44px;
    }
}

/* ============================================
   INLINE SHARE STRIP (Alternative for results)
   Horizontal strip with share options
   ============================================ */
.tool-share-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.tool-share-strip__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.tool-share-strip__buttons {
    display: flex;
    gap: 0.5rem;
}

.tool-share-strip__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    min-height: 36px;
}

.tool-share-strip__btn:hover {
    border-color: #000000;
    color: #000000;
}

.tool-share-strip__btn.copied {
    background: #d1fe17;
    border-color: #d1fe17;
    color: #000000;
}

.tool-share-strip__btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .tool-share-strip {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tool-share-strip__buttons {
        width: 100%;
    }

    .tool-share-strip__btn {
        flex: 1;
    }
}

/* ============================================
   FLOATING SHARE BAR (Sticky Bottom)
   Appears on scroll, encourages bookmarks
   ============================================ */
.tool-floating-share {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tool-floating-share.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.tool-floating-share__content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 1rem 0.75rem 1.25rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-floating-share__text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Stack Sans Headline', 'neusanstrial', -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
}

.tool-floating-share__buttons {
    display: flex;
    gap: 0.5rem;
}

.tool-floating-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Stack Sans Headline', 'neusanstrial', -apple-system, BlinkMacSystemFont, sans-serif;
    border: none;
    white-space: nowrap;
}

.tool-floating-share__btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.tool-floating-share__btn--bookmark {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

.tool-floating-share__btn--bookmark:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.tool-floating-share__btn--share {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

.tool-floating-share__btn--share:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.tool-floating-share__btn--copy {
    background: #d1fe17;
    color: #000000;
}

.tool-floating-share__btn--copy:hover {
    background: #e5ff4d;
}

.tool-floating-share__btn--copy.copied {
    background: #22c55e;
    color: #ffffff;
}

.tool-floating-share__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.25rem;
}

.tool-floating-share__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Floating bar focus states */
.tool-floating-share__btn:focus,
.tool-floating-share__close:focus {
    outline: 2px solid #d1fe17;
    outline-offset: 2px;
}

/* Floating bar mobile */
@media (max-width: 640px) {
    .tool-floating-share {
        bottom: 16px;
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(100px);
    }

    .tool-floating-share.is-visible {
        transform: translateX(0) translateY(0);
    }

    .tool-floating-share__content {
        width: 100%;
        justify-content: space-between;
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
    }

    .tool-floating-share__text {
        display: none;
    }

    .tool-floating-share__buttons {
        flex: 1;
        justify-content: center;
    }

    .tool-floating-share__btn {
        padding: 0.5rem 0.625rem;
    }

    .tool-floating-share__btn span {
        display: none;
    }
}

/* Floating bar small phones */
@media (max-width: 380px) {
    .tool-floating-share {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .tool-floating-share__content {
        padding: 0.5rem;
    }

    .tool-floating-share__btn {
        padding: 0.5rem;
    }

    .tool-floating-share__close {
        width: 24px;
        height: 24px;
    }
}

/* Toast notification for floating share bar */
.tool-floating-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #000000;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 101;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tool-floating-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.tool-floating-toast svg {
    color: #22c55e;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .tool-floating-toast {
        bottom: 90px;
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(20px);
    }

    .tool-floating-toast.is-visible {
        transform: translateX(0) translateY(0);
    }
}

/* ============================================
   SHARE DROPDOWN (Desktop Fallback)
   ============================================ */
.share-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.5rem;
    min-width: 200px;
    z-index: 1000;
    animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.share-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: #374151;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    text-align: left;
}

.share-dropdown__item:hover {
    background: #f9fafb;
}

.share-dropdown__item:active {
    background: #f3f4f6;
}

.share-dropdown__item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #6b7280;
}

/* ============================================
   BOOKMARK TOOLTIP
   ============================================ */
.bookmark-tooltip {
    position: fixed;
    z-index: 10000;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bookmark-tooltip--fade {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bookmark-tooltip__content {
    background: #000000;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.bookmark-tooltip__content strong {
    color: #d1fe17;
}

/* ============================================
   LEGACY SUPPORT (tool-share-actions)
   ============================================ */
.tool-share-actions {
    display: none;
}

/* ============================================
   LEGACY SUPPORT (tools-share-section)
   ============================================ */
.tools-share-section {
    display: none;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.hero-share-bar__btn:focus,
.tool-share-card__btn:focus,
.tool-share-strip__btn:focus,
.share-dropdown__item:focus {
    outline: 2px solid #d1fe17;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .share-dropdown {
        animation: none;
    }

    .hero-share-bar__btn,
    .tool-share-card__btn,
    .tool-share-strip__btn,
    .share-dropdown__item,
    .tool-floating-share,
    .tool-floating-share__btn,
    .tool-floating-share__close,
    .tool-floating-toast {
        transition: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .hero-share-bar,
    .tool-share-card,
    .tool-share-strip,
    .tool-share-actions,
    .tools-share-section,
    .tool-floating-share,
    .tool-floating-toast {
        display: none;
    }
}
