/* ============================================================
   share.css — Global Share Panel
   ============================================================ */

/* ── Floating Action Button ──────────────────────────────── */
/* Entrance animation */
@keyframes fab-in {
    from { transform: scale(0) translateY(40px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.share-fab {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    z-index: 1050;
    width: 60px; /* Slightly larger for presence */
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee 0%, #7c3aed 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 24px rgba(67, 97, 238, 0.4);
    transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
    animation: fab-in 0.6s cubic-bezier(.34,1.56,.64,1) backwards;
    outline: none;
}
.share-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(67, 97, 238, 0.5);
}
.share-fab.open {
    transform: rotate(45deg);
    background: #f43f5e;
}

/* ── WhatsApp FAB (Bottom Left) ─────────────────────────── */
.whatsapp-fab {
    position: fixed;
    bottom: 2rem;
    left: 1.5rem;
    z-index: 1050;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
    animation: fab-in 0.6s cubic-bezier(.34,1.56,.64,1) 0.2s backwards;
    outline: none;
    text-decoration: none !important;
}
.whatsapp-fab:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
    color: #fff;
}
.whatsapp-fab::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid #25D366;
    border-radius: 50%;
    opacity: 0;
    animation: fab-pulse-wa 2s ease-out 3s infinite;
    pointer-events: none;
}
@keyframes fab-pulse-wa {
    0% { transform: scale(1); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Discoverability Pulse */
.share-fab::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid #4361ee;
    border-radius: 50%;
    opacity: 0;
    animation: fab-pulse 2s ease-out 2s 3;
    pointer-events: none;
}
@keyframes fab-pulse {
    0% { transform: scale(1); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ── Backdrop ────────────────────────────────────────────── */
.share-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.share-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* ── Share Panel ─────────────────────────────────────────── */
.share-panel {
    position: fixed;
    bottom: 90px;
    right: 1.5rem;
    z-index: 1050;
    width: 300px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
}
.share-panel.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Panel header */
.share-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem 0.75rem;
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
    border-bottom: 1px solid #e8edf5;
}
.share-panel-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.share-panel-title i { color: #4361ee; }

/* URL preview bar */
.share-url-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 1rem;
    padding: 0.55rem 0.8rem;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
    overflow: hidden;
}
.share-url-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}
.share-copy-btn {
    flex-shrink: 0;
    padding: 0.3rem 0.7rem;
    background: #4361ee;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.share-copy-btn:hover { background: #3451d1; transform: scale(1.04); }
.share-copy-btn.copied { background: #10b981; }

/* Platform buttons grid */
.share-platforms {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 1rem 1rem;
}
.share-btn-platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 0.3rem;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #e8edf5;
    background: #fafbff;
    transition: all 0.2s;
    font-size: 0.68rem;
    font-weight: 600;
    color: #374151;
}
.share-btn-platform i { font-size: 1.3rem; }
.share-btn-platform:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #fff;
}

/* Platform-specific hover colors */
.share-btn-platform[data-platform="whatsapp"]:hover { background: #25D366; border-color: #25D366; }
.share-btn-platform[data-platform="twitter"]:hover  { background: #000; border-color: #000; }
.share-btn-platform[data-platform="facebook"]:hover { background: #1877F2; border-color: #1877F2; }
.share-btn-platform[data-platform="telegram"]:hover { background: #0088cc; border-color: #0088cc; }
.share-btn-platform[data-platform="email"]:hover    { background: #6366f1; border-color: #6366f1; }
.share-btn-platform[data-platform="linkedin"]:hover { background: #0A66C2; border-color: #0A66C2; }
.share-btn-platform[data-platform="native"]:hover   { background: #4361ee; border-color: #4361ee; }
.share-btn-platform[data-platform="qr"]:hover       { background: #0f172a; border-color: #0f172a; }

/* Platform icon colors at rest */
.share-btn-platform[data-platform="whatsapp"] i { color: #25D366; }
.share-btn-platform[data-platform="twitter"]  i { color: #000; }
.share-btn-platform[data-platform="facebook"] i { color: #1877F2; }
.share-btn-platform[data-platform="telegram"] i { color: #0088cc; }
.share-btn-platform[data-platform="email"]    i { color: #6366f1; }
.share-btn-platform[data-platform="linkedin"] i { color: #0A66C2; }
.share-btn-platform[data-platform="native"]   i { color: #4361ee; }
.share-btn-platform[data-platform="qr"]       i { color: #0f172a; }
.share-btn-platform:hover i { color: #fff !important; }

/* ── Toast notification ───────────────────────────────────── */
.share-toast {
    position: fixed;
    bottom: 8rem;
    right: 1.5rem;
    z-index: 1055;
    background: #1e293b;
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.25s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
}
.share-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.share-toast i { color: #10b981; }

/* ── QR Modal ────────────────────────────────────────────── */
.share-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.share-qr-modal.visible { opacity: 1; visibility: visible; }
.share-qr-box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    max-width: 280px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.share-qr-modal.visible .share-qr-box { transform: scale(1); }
.share-qr-box h5 { font-weight: 700; color: #1e293b; margin-bottom: 1rem; }
.share-qr-box img { width: 180px; height: 180px; border-radius: 8px; }
.share-qr-close {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: #f1f5f9;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    transition: background 0.18s;
}
.share-qr-close:hover { background: #e2e8f0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .share-panel { right: 0.75rem; width: calc(100vw - 1.5rem); max-width: 340px; }
    .share-fab { bottom: 1.5rem; right: 1rem; }
    .share-toast { right: 0.75rem; bottom: 7rem; }
}
