/* =============================================
   SmartDukaan Webinar – Frontend Styles
   ============================================= */

/* Fixed wrapper – bottom-right */
#css-slider-wrapper {
    position: fixed;
    bottom: 20px;
    right: 0;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    pointer-events: none;
}

/* ---- Tray: arrow tab + card slide as one piece ---- */
#css-slider-tray {
    display: flex;
    align-items: center;
    pointer-events: auto;
    /* Collapsed: only the tab sticks out; the card is off-screen */
    transform: translateX(calc(100% - 42px));
    transition: transform 0.4s ease;
    width: calc(100vw - 40px);
    /* max-width set inline from admin */
}

/* Animation variants on the tray */
#css-slider-tray.css-anim-slide {
    transition: transform var(--css-speed, 0.4s) ease;
}

#css-slider-tray.css-anim-fade-slide {
    transition: transform var(--css-speed, 0.4s) ease;
}

#css-slider-tray.css-anim-bounce {
    transition: transform var(--css-speed, 0.4s) cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#css-slider-tray.css-anim-elastic {
    transition: transform var(--css-speed, 0.4s) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Expanded: tray fully visible */
#css-slider-tray.css-open {
    transform: translateX(0);
}

/* ---- Arrow tab – sits on the left edge of the card ---- */
#css-slider-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 42px;
    padding: 14px 0;
    border: none;
    cursor: pointer;
    border-radius: 10px 0 0 10px;
    box-shadow: -3px 2px 12px rgba(0, 0, 0, 0.15);
    line-height: 1;
    z-index: 2;
    position: relative;
}

#css-slider-tab:hover {
    filter: brightness(1.08);
}

#css-slider-tab:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

/* Tab label (vertical text) */
.css-tab-label {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Arrow icons */
.css-arrow {
    display: block;
    flex-shrink: 0;
}

.css-arrow-close {
    display: none;
}

/* When open: flip arrows */
#css-slider-tray.css-open #css-slider-tab .css-arrow-open {
    display: none;
}

#css-slider-tray.css-open #css-slider-tab .css-arrow-close {
    display: block;
}

/* ---- Card panel ---- */
#css-slider-panel {
    flex: 1;
    min-width: 0;
    border-radius: 14px;
    border: 2px solid #d63031;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    z-index: 1;
}

/* ---- Inner two-column layout ---- */
.css-slider-inner {
    display: flex;
    align-items: stretch;
}

/* Left column */
.css-slider-left {
    flex: 1 1 58%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Right column */
.css-slider-right {
    flex: 0 0 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
}

/* ---- Content image (e.g. Google Meet logo) ---- */
.css-slider-content-img {
    margin-bottom: 10px;
}

.css-slider-content-img img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

/* ---- HTML content area ---- */
.css-slider-html {
    line-height: 1.55;
    color: #222;
    word-wrap: break-word;
}

.css-slider-html h1,
.css-slider-html h2,
.css-slider-html h3 {
    margin: 0 0 8px;
    color: #111;
    font-weight: 700;
    line-height: 1.3;
}

.css-slider-html h2 {
    font-size: 20px;
}

.css-slider-html h3 {
    font-size: 17px;
}

.css-slider-html p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.css-slider-html ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.css-slider-html li {
    font-size: 14px;
    line-height: 15px;
    margin-bottom: 0;
    color: #444;
}

.css-slider-html img {
    max-width: 100%;
    height: auto;
}

/* ---- Speaker photo ---- */
.css-speaker-photo {
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 5px;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    /* width & height set inline from admin */
}

.css-speaker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Speaker info ---- */
.css-speaker-name {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    margin-bottom: -10px;
}

.css-speaker-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

/* ---- CTA button ---- */
.css-slider-button {
    display: inline-block;
    padding: 5px 15px;
    background: #d63031;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease;
}

.css-slider-button:hover {
    background: #b71c1c;
    transform: translateY(-1px);
}

/* ======================
   RESPONSIVE – Mobile
   ====================== */
@media (max-width: 680px) {
    #css-slider-wrapper {
        bottom: 10px;
    }

    #css-slider-tray {
        width: calc(100vw - 20px);
        max-width: none !important;
        transform: translateX(calc(100% - 36px));
    }

    #css-slider-tab {
        width: 36px;
        padding: 10px 0;
        border-radius: 8px 0 0 8px;
    }

    .css-tab-label {
        font-size: 9px;
    }

    .css-arrow {
        width: 14px;
        height: 14px;
    }

    #css-slider-panel {
        border-radius: 10px;
    }

    .css-slider-inner {
        flex-direction: column;
    }

    .css-slider-left {
        padding: 15px;
    }

    .css-slider-right {
        flex: none;
        display: grid;
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto auto;
        gap: 0 12px;
        padding: 15px;
        text-align: left;
        align-items: center;
    }

    .css-speaker-photo {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0;
        grid-row: 1 / 3;
        grid-column: 1;
    }

    .css-speaker-name {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
        white-space: nowrap;
        margin-bottom: -20px;
    }

    .css-speaker-title {
        grid-column: 2;
        grid-row: 2;
        margin-bottom: 0;
        font-size: 11px;
        white-space: nowrap;
    }

    .css-slider-button {
        grid-column: 1 / -1;
        margin-top: 10px;
        text-align: center;
        padding: 5px;
        font-size: 12px;
        white-space: nowrap;
    }
}

@media (max-width: 400px) {
    .css-slider-left {
        padding: 18px 16px 8px;
    }

    .css-slider-right {
        padding: 8px 16px 14px;
    }

    .css-slider-html h2 {
        font-size: 17px;
    }
}