/* ==========================================================================
   Digital Social Share — Engagement Styles
   ========================================================================== */

/* ---- Container ---- */
.dss-engagement {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 0 4px;
    margin-top: 8px;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, sans-serif;
    font-size: 13px;
    line-height: 1;
    color: #555;
}

/* ---- Each engagement item ---- */
.dss-eng-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ---- Buttons (like, comment, star, share) ---- */
.dss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.dss-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.dss-btn:active {
    transform: scale(0.92);
}

.dss-btn.dss-disabled {
    cursor: default;
    opacity: 0.55;
    pointer-events: none;
}

/* ---- SVG Icon ---- */
.dss-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---- Like ---- */
.dss-like-btn {
    color: #999;
}

.dss-like-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
}

.dss-like-btn.dss-liked {
    color: #e74c3c;
}

.dss-like-btn.dss-liked .dss-icon {
    animation: dss-pop 0.3s ease;
}

/* ---- Stars / Rating ---- */
.dss-stars {
    display: inline-flex;
    gap: 1px;
}

.dss-star-btn {
    font-size: 16px;
    padding: 2px;
    color: #ccc;
    transition: color 0.15s ease, transform 0.15s ease;
}

.dss-star-btn.dss-star-active {
    color: #f5a623;
}

.dss-star-btn:not(.dss-disabled):hover {
    color: #f5a623;
    transform: scale(1.2);
}

.dss-rating-info {
    font-size: 12px;
    color: #888;
}

.dss-rate-avg {
    font-weight: 600;
    color: #f5a623;
}

/* ---- Comment ---- */
.dss-comment-btn {
    color: #999;
}

.dss-comment-btn:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.08);
}

.dss-comment-form {
    width: 100%;
    flex-basis: 100%;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dss-comment-text {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(128, 128, 128, 0.25);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 48px;
    outline: none;
    transition: border-color 0.2s ease;
}

.dss-comment-text:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

.dss-comment-submit {
    align-self: flex-end;
    background: #3498db;
    color: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.dss-comment-submit:hover {
    background: #2980b9;
    color: #fff;
}

/* ---- Share ---- */
.dss-share-btn {
    color: #999;
}

.dss-share-btn:hover {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.08);
}

.dss-eng-share .a2a_kit {
    display: inline-flex !important;
    align-items: center;
}

/* ---- Count label ---- */
.dss-count {
    font-size: 12px;
    font-weight: 500;
    color: #777;
    min-width: 8px;
}

/* ---- Animations ---- */
@keyframes dss-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes dss-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dss-engagement {
    animation: dss-fade-in 0.3s ease;
}

/* ---- Loading indicator ---- */
.dss-btn.dss-loading {
    pointer-events: none;
    opacity: 0.5;
}

.dss-btn.dss-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: dss-spin 0.6s linear infinite;
    margin-left: 4px;
}

@keyframes dss-spin {
    to { transform: rotate(360deg); }
}

/* ---- Success flash ---- */
.dss-flash {
    animation: dss-flash-bg 0.6s ease;
}

@keyframes dss-flash-bg {
    0%   { background: rgba(46, 204, 113, 0.2); }
    100% { background: transparent; }
}

/* ==========================================================================
   Widget-specific adjustments
   ========================================================================== */

/* -- Post Carousel -- */
.nett-postcard-content .dss-engagement {
    padding: 8px 0 2px;
}

/* -- Product List (after JS relocation) -- */
.npl-card .dss-engagement {
    padding: 8px 16px 8px;
    margin-top: 0;
    border-top: 1px solid rgba(128, 128, 128, 0.12);
}

/* -- Comparisons (after <a> tag) -- */
.nc-list-item + .dss-engagement {
    padding: 6px 12px 10px;
    margin-top: -2px;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

/* Dark-themed comparisons widget */
.nc-section .dss-engagement {
    color: rgba(255, 255, 255, 0.7);
}

.nc-section .dss-btn {
    color: rgba(255, 255, 255, 0.5);
}

.nc-section .dss-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nc-section .dss-count {
    color: rgba(255, 255, 255, 0.6);
}

.nc-section .dss-comment-text {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.nc-section .dss-rating-info {
    color: rgba(255, 255, 255, 0.5);
}

/* -- Comparison Table -- */
.nct-row .dss-engagement,
.nct-col-card-inner .dss-engagement {
    width: 100%;
    padding: 8px 12px;
    margin-top: 6px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {
    .dss-engagement {
        gap: 8px;
        font-size: 12px;
    }

    .dss-btn {
        padding: 3px 4px;
        font-size: 13px;
    }

    .dss-icon {
        width: 14px;
        height: 14px;
    }

    .dss-star-btn {
        font-size: 14px;
    }

    .dss-comment-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dss-engagement {
        gap: 6px;
    }

    .dss-eng-rating .dss-stars {
        gap: 0;
    }
}
