/* --- 1. Trigger Buttons --- */
.ua-share-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
    font-size: 14px;
}

.ua-share-trigger i {
    font-size: 18px;
}

/* --- Modal Overlay --- */
.ua-share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
}

.ua-share-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.ua-share-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

/* --- Modal Content --- */
.ua-share-modal {
    pointer-events: auto;
    background: #fff;
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: uaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes uaSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.ua-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid #eee;
    /* background: #fff; */
}

.ua-share-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #111;
    letter-spacing: -0.02em;
}

.ua-close-share {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    width: 32px;
    height: 32px;
    justify-content: center;
    border-radius: 50%;
    transition: 0.2s;
}

.ua-close-share:hover {
    color: #111;
    background: #f5f5f5;
}

/* Body */
.ua-share-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 70vh;
}

/* OG Preview */
.ua-og-preview {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    margin-bottom: 20px;
    position: relative;
}

.ua-og-preview img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.ua-og-meta {
    padding: 12px 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.ua-og-host {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    margin-bottom: 4px;
}

.ua-og-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Grid */
.ua-share-grid {
    display: grid;
    /* Default - overridden by Elementor controls */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.ua-share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #555;
    transition: 0.2s;
}

.ua-si-icon {
    /* Defaults - overridden by Elementor controls */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    transition: 0.2s;
}

.ua-si-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Specific Colors */
.item-x .ua-si-icon {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

.item-facebook .ua-si-icon {
    color: #1877F2;
    background: rgba(24, 119, 242, 0.1);
}

.item-whatsapp .ua-si-icon {
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

.item-reddit .ua-si-icon {
    color: #FF4500;
    background: rgba(255, 69, 0, 0.1);
}

.item-linkedin .ua-si-icon {
    color: #0077b5;
    background: rgba(0, 119, 181, 0.1);
}

/* NEW: Pinterest & Instagram Colors */
.item-pinterest .ua-si-icon {
    color: #E60023;
    background: rgba(230, 0, 35, 0.1);
}

.item-instagram .ua-si-icon {
    color: #E1306C;
    background: rgba(225, 48, 108, 0.1);
}

/* Footer */
.ua-share-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    margin-top: auto;
    background: #fff;
}

.ua-ft-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ua-ft-content h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.ua-share-cta {
    background: #111;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.ua-share-cta:hover {
    background: #333;
    transform: translateX(2px);
}

/* Toast */
.ua-copy-toast {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 100000;
}

.ua-copy-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .ua-share-modal {
        border-radius: 16px !important;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .ua-share-modal {
        border-radius: 16px 16px 0 0 !important;
        margin-top: auto;
        max-height: 90vh;
    }

    .ua-share-wrapper {
        align-items: flex-end;
        padding: 0;
        height: 100%;
    }

    .ua-share-modal {
        animation: uaSlideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ua-share-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@keyframes uaSlideUpMobile {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}