/* ============================================================================
   Social Share — Button + Popup in Program Modals
   A "Share Program" button next to "Download Brochure" that opens a popup.
   ============================================================================ */

/* Share button content (icon + text) */
.share-btn-content {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.share-arrow-icon {
    display: inline-block;
    vertical-align: middle;
}

/* The share button itself inherits .cta-button styling from the modal.
   The .share-program-btn class adds relative positioning for the popup. */
.share-program-btn {
    position: relative;
}

.share-program-btn:hover {
    background: #eef1ff !important;
}

/* The popup panel — positioned above the button */
.share-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.95);
    width: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
}

.share-popup.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.share-popup__header {
    padding: 0.6rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    border-bottom: 1px solid #f0f0f0;
}

.share-popup__grid {
    display: flex;
    flex-direction: column;
}

/* Individual platform button inside popup */
.share-popup__btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    color: #333;
    transition: background 0.15s ease;
    text-align: left;
}

.share-popup__btn:hover {
    background: #f5f5ff;
}

.share-popup__btn:active {
    background: #eee;
}

.share-popup__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.share-popup__icon svg {
    display: block;
}

.share-popup__label {
    font-weight: 500;
}

/* Toast notification */
.share-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.65rem 1.4rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.share-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

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

@media (max-width: 768px) {
    .share-popup {
        width: 180px;
    }
}
