/**
 * File Path: assets/css/front/mbs-front-social-share.css
 * Social Share — hero toggle button + popup chip grid (UX-005, Session 115)
 * Component of mbs-front.css — enqueued by MBS_Front_Assets dep: mbs-front.
 * Flat selectors (CSS-002 / CSS-NEST-001 compliance).
 */

/* ==========================================================================
   Hero wrap + toggle button
   ========================================================================== */

.mbs-share-hero-wrap {
    position: relative;
    display: inline-block;
    margin-top: 14px;
}

.mbs-share-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    border: 1.5px solid var(--mbs-accent, var(--mbs-teal));
    border-radius: 100px;
    color: var(--mbs-accent, var(--mbs-teal));
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.mbs-share-hero-btn:hover,
.mbs-share-hero-btn:focus {
    background: var(--mbs-accent, var(--mbs-teal));
    color: #fff;
    border-color: var(--mbs-accent, var(--mbs-teal));
}

.mbs-share-hero-btn:focus-visible {
    outline: 3px solid var(--mbs-accent, var(--mbs-teal));
    outline-offset: 2px;
}

.mbs-share-hero-icon {
    flex-shrink: 0;
}

/* ==========================================================================
   Popup panel
   ========================================================================== */

.mbs-share-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 200;
    width: 300px;
    max-width: calc(100vw - 24px);
    background: var(--mbs-card-bg, #fff);
    border: 1px solid var(--mbs-border, #e0e0e0);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 14px;
}

.mbs-share-popup[hidden] {
    display: none;
}

.mbs-share-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mbs-share-popup-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mbs-heading, #1f2937);
}

.mbs-share-popup-close {
    background: none;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    color: var(--mbs-muted, #6b7280);
    font-size: 1rem;
    line-height: 1;
    border-radius: 4px;
}

.mbs-share-popup-close:hover {
    background: var(--mbs-border, #e0e0e0);
    color: var(--mbs-ink, #1f2937);
}

/* ==========================================================================
   Native share button (shown via JS when navigator.share available)
   ========================================================================== */

.mbs-share-native-btn {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    margin-bottom: 10px;
    background: var(--mbs-accent, var(--mbs-teal));
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mbs-share-native-btn:hover {
    background: var(--mbs-accent-dark, #3a97a3);
}

.mbs-share-popup-divider {
    display: none;
    height: 1px;
    background: var(--mbs-border, #e0e0e0);
    margin: 0 0 10px;
}

/* ==========================================================================
   Platform chip grid
   ========================================================================== */

.mbs-share-popup-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.mbs-share-platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px 5px 8px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid var(--mbs-platform-color, #aaa);
    color: var(--mbs-platform-color, #555);
    background: transparent;
    transition: background 0.14s ease, color 0.14s ease;
}

.mbs-share-platform-btn:hover,
.mbs-share-platform-btn:focus {
    background: var(--mbs-platform-color, #aaa);
    color: #fff;
}

.mbs-share-platform-btn:focus-visible {
    outline: 3px solid var(--mbs-platform-color, #aaa);
    outline-offset: 2px;
}

.mbs-platform-icon {
    flex-shrink: 0;
    color: var(--mbs-platform-color, #555);
    transition: color 0.14s ease;
}

.mbs-share-platform-btn:hover .mbs-platform-icon,
.mbs-share-platform-btn:focus .mbs-platform-icon {
    color: #fff;
}

.mbs-platform-label {
    white-space: nowrap;
}

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

@media (max-width: 480px) {
    .mbs-share-popup {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100vw - 24px);
    }
    .mbs-share-hero-btn {
        padding: 7px 14px;
        font-size: 0.82rem;
    }
}
