/* Slide-Out CTA Tab
   Uses CSS variables set inline by the plugin (--soc-tab-bg, etc.) */

.soc-wrap {
    position: fixed;
    top: var(--soc-vertical-pos, 50%);
    transform: translateY(-50%);
    z-index: 99998;
    display: flex;
    align-items: flex-start;
}

.soc-wrap.soc-right { right: 0; flex-direction: row; }
.soc-wrap.soc-left  { left: 0;  flex-direction: row-reverse; }

/* ---- Tab button ---- */
.soc-tab {
    background: var(--soc-tab-bg, #1e3a6e);
    color: var(--soc-tab-text, #fff);
    border: none;
    cursor: pointer;
    padding: 20px 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.2;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: 0 4px 18px rgba(0,0,0,.18);
    transition: filter .2s ease, padding .2s ease;
    white-space: nowrap;
    align-self: center;
}
.soc-wrap.soc-right .soc-tab { border-radius: 14px 0 0 14px; }
.soc-wrap.soc-left  .soc-tab { border-radius: 0 14px 14px 0; text-orientation: mixed; transform: rotate(180deg); }

.soc-tab:hover { filter: brightness(1.1); }
.soc-tab:focus-visible { outline: 3px solid var(--soc-tab-text, #fff); outline-offset: -6px; }

/* ---- Panel ---- */
.soc-panel {
    background: var(--soc-panel-bg, #fff);
    width: var(--soc-panel-width, 380px);
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    padding: 28px 26px 32px;
    box-sizing: border-box;
    position: relative;
    /* Hidden by default: collapsed to 0 width */
    width: 0;
    padding-left: 0;
    padding-right: 0;
    opacity: 0;
    pointer-events: none;
    transition: width .32s cubic-bezier(.4,0,.2,1),
                opacity .25s ease,
                padding .32s cubic-bezier(.4,0,.2,1);
    align-self: center;
}
.soc-wrap.soc-right .soc-panel { border-radius: 14px 0 0 14px; }
.soc-wrap.soc-left  .soc-panel { border-radius: 0 14px 14px 0; }

.soc-wrap.soc-open .soc-panel {
    width: var(--soc-panel-width, 380px);
    padding: 28px 26px 32px;
    opacity: 1;
    pointer-events: auto;
}

.soc-heading {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.25;
    color: #1e293b;
}

.soc-content { font-size: 15px; line-height: 1.55; }

/* ---- Close button ---- */
.soc-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 4px 8px;
}
.soc-close:hover { color: #0f172a; }

/* ---- Overlay (mobile) ---- */
.soc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 99997;
}
body.soc-open-body .soc-overlay { opacity: 1; pointer-events: auto; }

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .soc-wrap.soc-open .soc-panel {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        width: 88vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .soc-wrap.soc-left.soc-open .soc-panel { left: 0; right: auto; }
    .soc-tab { padding: 16px 10px; font-size: 14px; }
}
