.ccwp-share-trigger {
    background: rgba(255, 255, 255, 0.90);
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .06), 0 2px 6px rgba(15, 23, 42, .16);
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, border-color .18s ease;
    cursor: pointer;
    color: #475569;
    padding: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ccwp-share-trigger:hover {
    background: #fff;
    box-shadow: 0 2px 2px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .20);
    transform: translateY(-1px);
    color: #475569;
}

body.ccwp-popup-abierto {
    overflow: hidden;
}

.ccwp-share-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 9998;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: opacity .28s ease, visibility .28s ease;
    isolation: isolate;
}

.ccwp-share-overlay.activo {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.ccwp-share-backdrop {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    border: 0;
    background-color: rgba(32, 43, 80, 0.8);
    cursor: pointer;
    padding: 0;
    margin: 0;
    z-index: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}

.ccwp-share-overlay.activo .ccwp-share-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ccwp-share-modal {
    position: relative;
    z-index: 1;
    width: min(460px, calc(100vw - 24px));
    max-width: 460px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(16px) scale(.985);
    transform-origin: center center;
    transition:
        opacity .28s ease,
        visibility .28s ease,
        transform .28s cubic-bezier(.22, 1, .36, 1);
    will-change: opacity, transform;
}

.ccwp-share-overlay.activo .ccwp-share-modal {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.ccwp-share-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.ccwp-share-header-text h3,
.ccwp-share-header-text p {
    margin: 0;
}

.ccwp-share-header-text h3 {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
    color: #0f172a;
}

.ccwp-share-header-text p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.ccwp-share-close {
    width: 36px;
    height: 36px;
    border: 1px solid #CAD5E2;
    background: transparent;
    border-radius: 12px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
    padding: 0;
    flex-shrink: 0;
}

.ccwp-share-close:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #b8c5d6;
    transform: scale(1.03);
}

.ccwp-share-body {
    padding: 20px;
}

.ccwp-share-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ccwp-share-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    text-align: center;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 18px;
    padding: 12px 8px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.ccwp-share-card:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.ccwp-share-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 18px;
}

.ccwp-share-card-label {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 500;
    color: #475569;
}

.ccwp-share-link-box {
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 22px;
    padding: 14px;
}

.ccwp-share-link-label {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.ccwp-share-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.ccwp-share-link-input {
    min-width: 0;
    flex: 1;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
    color: #475569;
}

.ccwp-share-link-input span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ccwp-copy-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: #0f172a;
    color: #fff;
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .18s ease, transform .18s ease;
}

.ccwp-copy-button:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.ccwp-copy-button.copiado {
    background: #059669;
}

@media (prefers-reduced-motion: reduce) {
    .ccwp-share-overlay,
    .ccwp-share-backdrop,
    .ccwp-share-modal,
    .ccwp-share-close,
    .ccwp-share-card,
    .ccwp-copy-button,
    .ccwp-share-trigger {
        transition: none;
    }
}

@media (max-width: 480px) {
    .ccwp-share-overlay {
        padding: 8px;
    }

    .ccwp-share-modal {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 24px;
    }

    .ccwp-share-header,
    .ccwp-share-body {
        padding: 16px;
    }

    .ccwp-share-grid {
        gap: 10px;
    }

    .ccwp-share-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 16px;
    }

    .ccwp-share-link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ccwp-copy-button {
        width: 100%;
        justify-content: center;
    }
}