/**
 * Fems Music Player — Embed CSS
 *
 * Applied only on embed pages (/fems-embed/*).
 * Overrides and additions specific to the iframe context.
 */

/* ─── Embed body ─────────────────────────────────────────────────────────── */
/* IMPORTANT: this CSS file loads on every frontend page (for the embed       */
/* trigger button + modal), so body-level rules must be scoped to the        */
/* embed iframe context only — never apply globally to the whole site.       */
body.fems-embed-page {
    background: transparent !important;
    margin:     0 !important;
    padding:    0 !important;
    overflow:   hidden !important;
}

/* ─── Card fills the iframe ──────────────────────────────────────────────── */
.fems-player-wrap.fems-is-embed {
    width:  100% !important;
    margin: 0 !important;
}

.fems-player-wrap.fems-is-embed .fems-card {
    border-radius: 0 !important;
    height:        100vh !important;
}

/* Lower panel fills remaining space after upper panel */
.fems-player-wrap.fems-is-embed .fems-lower-panel {
    flex: 1 !important;
}
/* ─── Powered-by footer strip ────────────────────────────────────────────── */
.fems-embed-footer {
    display:         flex !important;
    align-items:     center !important;
    justify-content: space-between !important;
    padding:         8px 18px !important;
    background:      var(--fems-bg-elevated, #1a1a1e) !important;
    border-top:      0.5px solid rgba(255,255,255,0.06) !important;
}

.fems-embed-footer a {
    font-family:    'DM Mono', monospace !important;
    font-size:      10px !important;
    font-weight:    400 !important;
    color:          var(--fems-text-tertiary, #4a4a58) !important;
    text-decoration:none !important;
    letter-spacing: 0.04em !important;
    transition:     color 0.12s !important;
}

.fems-embed-footer a:hover {
    color: var(--fems-text-secondary, #888896) !important;
}

.fems-embed-footer .fems-embed-logo {
    font-family: 'Syne', sans-serif !important;
    font-size:   10px !important;
    font-weight: 600 !important;
    color:       var(--fems-accent, #c8ff00) !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

/* ─── Request Alts/Stems in embed — link style, opens site in new tab ────── */
.fems-player-wrap.fems-is-embed .fems-btn-alts {
    font-size:             10px !important;
    color:                 var(--fems-text-tertiary, #4a4a58) !important;
    text-decoration-color: rgba(255,255,255,0.15) !important;
}

.fems-player-wrap.fems-is-embed .fems-btn-alts::after {
    content:      ' ↗' !important;
    font-size:    9px !important;
    opacity:      0.5 !important;
}

/* ─── Embed code modal ───────────────────────────────────────────────────── */
.fems-embed-modal {
    display:         none !important;
    position:        fixed !important;
    inset:           0 !important;
    background:      rgba(0,0,0,0.65) !important;
    z-index:         99999 !important;
    align-items:     center !important;
    justify-content: center !important;
    padding:         20px !important;
}

.fems-embed-modal.is-open { display: flex !important; }

.fems-embed-modal-inner {
    background:    var(--fems-bg-card, #131316) !important;
    box-shadow:    0 0 0 0.5px rgba(255,255,255,0.08) !important;
    border-radius: 12px !important;
    padding:       24px !important;
    width:         100% !important;
    max-width:     520px !important;
    position:      relative !important;
}

.fems-embed-modal-inner h3 {
    font-family:   'Syne', sans-serif !important;
    font-size:     15px !important;
    font-weight:   600 !important;
    color:         var(--fems-text-primary, #f0f0f2) !important;
    margin-bottom: 16px !important;
    display:       block !important;
}

.fems-embed-tabs {
    display:       flex !important;
    gap:           6px !important;
    margin-bottom: 14px !important;
}

.fems-embed-tab {
    font-family:   'DM Mono', monospace !important;
    font-size:     10px !important;
    font-weight:   400 !important;
    letter-spacing:0.08em !important;
    text-transform:uppercase !important;
    padding:       5px 12px !important;
    border-radius: 5px !important;
    cursor:        pointer !important;
    background:    var(--fems-bg-elevated, #1a1a1e) !important;
    color:         var(--fems-text-tertiary, #4a4a58) !important;
    border:        0.5px solid rgba(255,255,255,0.06) !important;
    transition:    background 0.12s, color 0.12s !important;
}

.fems-embed-tab.is-active {
    background: var(--fems-accent, #c8ff00) !important;
    color:      #0d0d0f !important;
    border-color: transparent !important;
}

.fems-embed-code-wrap {
    position:   relative !important;
    margin-bottom: 12px !important;
}

.fems-embed-code {
    display:       block !important;
    width:         100% !important;
    background:    var(--fems-bg-elevated, #1a1a1e) !important;
    box-shadow:    0 0 0 0.5px rgba(255,255,255,0.06) !important;
    border-radius: 7px !important;
    padding:       12px !important;
    font-family:   'DM Mono', monospace !important;
    font-size:     11px !important;
    color:         var(--fems-text-secondary, #888896) !important;
    line-height:   1.6 !important;
    white-space:   pre !important;
    overflow-x:    auto !important;
    resize:        none !important;
    border:        none !important;
    outline:       none !important;
    min-height:    110px !important;
}

.fems-embed-copy-btn {
    font-family:   'Syne', sans-serif !important;
    font-size:     11px !important;
    font-weight:   600 !important;
    color:         #0d0d0f !important;
    background:    var(--fems-accent, #c8ff00) !important;
    border:        none !important;
    border-radius: 7px !important;
    padding:       8px 18px !important;
    cursor:        pointer !important;
    transition:    opacity 0.12s !important;
}

.fems-embed-copy-btn:hover { opacity: 0.88 !important; }

.fems-embed-copy-confirm {
    font-family: 'DM Mono', monospace !important;
    font-size:   11px !important;
    color:       var(--fems-accent, #c8ff00) !important;
    margin-left: 10px !important;
    opacity:     0 !important;
    transition:  opacity 0.2s !important;
}

.fems-embed-copy-confirm.visible { opacity: 1 !important; }

.fems-embed-modal-close {
    position:    absolute !important;
    top:         14px !important;
    right:       14px !important;
    background:  transparent !important;
    border:      none !important;
    color:       var(--fems-text-tertiary, #4a4a58) !important;
    font-size:   18px !important;
    cursor:      pointer !important;
    line-height: 1 !important;
    padding:     4px !important;
}

.fems-embed-modal-close:hover {
    color: var(--fems-text-primary, #f0f0f2) !important;
}

.fems-embed-url-label {
    font-family: 'DM Mono', monospace !important;
    font-size:   10px !important;
    color:       var(--fems-text-tertiary, #4a4a58) !important;
    margin-bottom: 6px !important;
    display:     block !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

.fems-embed-url {
    font-family: 'DM Mono', monospace !important;
    font-size:   11px !important;
    color:       var(--fems-text-secondary, #888896) !important;
    word-break:  break-all !important;
}

/* ─── Get Embed Code button (in main player) ─────────────────────────────── */
.fems-embed-trigger {
    display:         flex !important;
    align-items:     center !important;
    gap:             6px !important;
    font-family:     'Syne', sans-serif !important;
    font-size:       11px !important;
    font-weight:     600 !important;
    letter-spacing:  0.02em !important;
    text-transform:  none !important;
    color:           var(--fems-text-primary, #f0f0f2) !important;
    background:      var(--fems-bg-elevated, #1a1a1e) !important;
    border:          0.5px solid rgba(255,255,255,0.12) !important;
    border-radius:   6px !important;
    padding:         5px 10px !important;
    cursor:          pointer !important;
}

.fems-embed-trigger:hover {
    background:   var(--fems-bg-elevated, #1a1a1e) !important;
    color:        var(--fems-text-primary, #f0f0f2) !important;
    border-color: rgba(255,255,255,0.12) !important;
}

.fems-embed-trigger svg {
    flex-shrink: 0 !important;
}

/* ─── Embed trigger bar (bottom of player card on main site) ─────────────── */
.fems-player-wrap .fems-embed-bar {
    display:         flex !important;
    align-items:     center !important;
    justify-content: flex-end !important;
    padding:         10px 18px !important;
    box-shadow:      inset 0 0.5px 0 var(--fems-border-subtle) !important;
}

/* Hide embed bar inside actual embed iframes — only show on main site */
.fems-player-wrap.fems-is-embed .fems-embed-bar {
    display: none !important;
}
