/* ==========================================================================
   Independent Interactions - Core Layout Engine
   ========================================================================== */

/* Main Flex Wrapper Container */
.ii-interaction-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    margin: 30px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Like Button Configuration
   -------------------------------------------------------------------------- */
.ii-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 16px;
    height: 40px; /* Uniform height match with share links */
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ii-like-btn svg {
    fill: none;
    stroke: #64748b;
    stroke-width: 2.5;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

/* Like Hover State */
.ii-like-btn:hover {
    border-color: #f43f5e;
    color: #f43f5e;
    background: #fff5f5;
}

.ii-like-btn:hover svg {
    stroke: #f43f5e;
    transform: scale(1.1);
}

/* Like Active/Clicked State */
.ii-like-btn.ii-liked {
    background: #ffe4e6;
    border-color: #fb7185;
    color: #e11d48;
    cursor: default;
    opacity: 1 !important;
}

.ii-like-btn.ii-liked svg {
    fill: #e11d48;
    stroke: #e11d48;
}

/* --------------------------------------------------------------------------
   Social Sharing Configurations (Forced Authentic Brand Colors)
   -------------------------------------------------------------------------- */
.ii-share-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ii-share-label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-right: 4px;
}

/* Global Link Frame Defaults */
.ii-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;  /* Enlarged hit box for optimized mobile ergonomics */
    height: 40px; /* Enlarged hit box for optimized mobile ergonomics */
    border-radius: 8px;
    border: none;
    transition: filter 0.2s ease, transform 0.1s ease;
}

/* Icon Vector Layer Fill */
.ii-share-link svg {
    fill: #ffffff;
    display: block;
}

/* Forced Specific Site Color Controls */
.ii-share-link.x-icon {
    background: #000000 !important;
}

.ii-share-link.fb-icon {
    background: #1877f2 !important;
}

.ii-share-link.bsky-icon {
    background: #0285ff !important;
}

/* Ensure the butterfly icon stays sharp and handles canvas padding cleanly */
.ii-share-link.bsky-icon svg {
    width: 22px;
    height: 22px;
}

.ii-share-link.threads-icon {
    background: #101010 !important;
}

/* High Contrast Hover Effects */
.ii-share-link:hover {
    filter: brightness(1.15); /* Boosts illumination uniformly without color shift distortion */
    transform: translateY(-1px);
}

.ii-share-link:active {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Mobile Viewport Layout Overrides
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .ii-interaction-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px 0;
    }
    .ii-like-section,
    .ii-share-section {
        width: 100%;
    }
    .ii-share-section {
        flex-wrap: wrap;
    }
}