/* Social Media Share — Frontend Styles */

:root {
    --sms-radius-rounded: 50px;
    --sms-radius-square: 8px;
    --sms-radius-minimal: 4px;
    --sms-gap: 8px;
    --sms-transition: 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Wrapper ── */
.sms-share-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Button row ── */
.sms-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sms-gap);
    align-items: center;
}

/* ── Base button ── */
.sms-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: transform var(--sms-transition), box-shadow var(--sms-transition), opacity 0.15s ease;
    position: relative;
    overflow: hidden;
}

.sms-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s ease;
}
.sms-btn:hover::after {
    background: rgba(255,255,255,0.12);
}

.sms-btn svg {
    flex-shrink: 0;
}

/* ── Icon sizes ── */
.sms-size-small  .sms-btn { padding: 7px 12px; font-size: 12px; }
.sms-size-small  .sms-icon svg { width: 14px; height: 14px; }
.sms-size-medium .sms-btn { padding: 10px 16px; }
.sms-size-medium .sms-icon svg { width: 18px; height: 18px; }
.sms-size-large  .sms-btn { padding: 13px 20px; font-size: 15px; }
.sms-size-large  .sms-icon svg { width: 22px; height: 22px; }

/* ── Icon styles ── */
.sms-style-rounded .sms-btn { border-radius: var(--sms-radius-rounded); }
.sms-style-square  .sms-btn { border-radius: var(--sms-radius-square); }
.sms-style-minimal .sms-btn { border-radius: var(--sms-radius-minimal); }

/* ── Color themes ── */

/* Original — each platform's own color */
.sms-theme-original .sms-btn {
    background: var(--sms-platform-color);
    color: #fff !important;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--sms-platform-color) 40%, transparent);
}

/* Dark — dark background, colored icon on hover */
.sms-theme-dark .sms-btn {
    background: #1a1a2e;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.sms-theme-dark .sms-btn:hover {
    background: var(--sms-platform-color) !important;
}

/* Light — light background, colored icon */
.sms-theme-light .sms-btn {
    background: #f3f4f6;
    color: var(--sms-platform-color) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.sms-theme-light .sms-btn:hover {
    background: var(--sms-platform-color) !important;
    color: #fff !important;
}

/* Gradient — vibrant gradient */
.sms-theme-gradient .sms-btn {
    background: linear-gradient(135deg, var(--sms-platform-color), color-mix(in srgb, var(--sms-platform-color) 60%, #000));
    color: #fff !important;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--sms-platform-color) 50%, transparent);
}

/* Outline — bordered, no fill */
.sms-theme-outline .sms-btn {
    background: transparent !important;
    color: var(--sms-platform-color) !important;
    border: 2px solid var(--sms-platform-color);
    box-shadow: none;
}
.sms-theme-outline .sms-btn:hover {
    background: var(--sms-platform-color) !important;
    color: #fff !important;
}

/* ── Animations ── */
.sms-animated .sms-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--sms-platform-color) 45%, transparent) !important;
}
.sms-animated .sms-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ── Share count badge ── */
.sms-count {
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ── Copy link state ── */
.sms-btn-copy.sms-copied {
    background: #10b981 !important;
}
.sms-btn-copy.sms-copied .sms-label::after {
    content: 'Copied!';
}
.sms-btn-copy.sms-copied .sms-label {
    font-size: 0;
}
.sms-btn-copy.sms-copied .sms-label::after {
    font-size: 13px;
}

/* ── Floating bar ── */
.sms-floating-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    padding: 10px 16px;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.sms-floating-bar.sms-floating-bottom { bottom: 0; border-top: 1px solid #e5e7eb; }
.sms-floating-bar.sms-floating-top    { top: 0;    border-bottom: 1px solid #e5e7eb; }
.sms-floating-bar .sms-buttons        { justify-content: center; }
.sms-floating-bar .sms-share-wrapper  { margin: 0; }
.sms-floating-bar.sms-hidden          { transform: translateY(100%); opacity: 0; pointer-events: none; }
.sms-floating-top.sms-hidden          { transform: translateY(-100%); }

/* ── Mobile ── */
@media (max-width: 600px) {
    .sms-buttons {
        gap: 6px;
    }
    .sms-ctx-inline .sms-label {
        display: none;
    }
    .sms-size-small  .sms-btn,
    .sms-size-medium .sms-btn { padding: 10px 12px; }
    .sms-size-large  .sms-btn { padding: 11px 14px; }
    .sms-floating-bar { padding: 8px 12px; }
    .sms-floating-bar .sms-label { display: none; }
}

/* ── Entrance animation ── */
@keyframes smsFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sms-animated .sms-ctx-inline .sms-btn {
    animation: smsFadeUp 0.4s ease both;
}
.sms-animated .sms-ctx-inline .sms-btn:nth-child(1)  { animation-delay: 0.05s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(2)  { animation-delay: 0.10s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(3)  { animation-delay: 0.15s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(4)  { animation-delay: 0.20s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(5)  { animation-delay: 0.25s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(6)  { animation-delay: 0.30s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(7)  { animation-delay: 0.35s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(8)  { animation-delay: 0.40s; }
.sms-animated .sms-ctx-inline .sms-btn:nth-child(9)  { animation-delay: 0.45s; }
