/* ========================================
   GUESTFLIP WIDGET - COMPLETE STYLES
   Single instance (no duplication)
======================================== */

/* =========================
   BASE WRAPPER (SHARED)
========================= */
.guestflip-wrapper {
    position: fixed;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* =========================
   DESKTOP VIEW
========================= */
@media (min-width: 769px) {

    .guestflip-wrapper {
        bottom: 20px;
        right: 20px;
        width: 220px;
    }

    /* Glow frame */
    .guestflip-wrapper::before {
        content: "";
        position: absolute;
        inset: -6px;
        border-radius: 16px;

        background: rgba(255, 255, 255, 0.9);

        box-shadow:
            0 0 10px rgba(0, 200, 120, 0.35),
            0 0 20px rgba(0, 200, 120, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.15);

        animation: glowPulse 2.5s infinite ease-in-out;
        z-index: -1;
    }

    .guestflip-wrapper:hover {
        transform: translateY(-4px);
    }
}

/* Glow animation */
@keyframes glowPulse {
    0% {
        box-shadow:
            0 0 8px rgba(0, 200, 120, 0.3),
            0 0 18px rgba(0, 200, 120, 0.15),
            0 10px 25px rgba(0, 0, 0, 0.12);
    }
    50% {
        box-shadow:
            0 0 14px rgba(0, 200, 120, 0.55),
            0 0 28px rgba(0, 200, 120, 0.25),
            0 12px 35px rgba(0, 0, 0, 0.18);
    }
    100% {
        box-shadow:
            0 0 8px rgba(0, 200, 120, 0.3),
            0 0 18px rgba(0, 200, 120, 0.15),
            0 10px 25px rgba(0, 0, 0, 0.12);
    }
}

/* =========================
   MOBILE TOGGLE BUTTON
========================= */
.guestflip-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;

    width: 25px;
    height: 25px;

    background: #198754;
    color: #fff;

    font-size: 26px;
    border-radius: 50%;

    display: none;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 20px rgba(0,0,0,0.25);

    z-index: 10000;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guestflip-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* =========================
   MOBILE PANEL
========================= */
.guestflip-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    height: 30%;
    width: 30%;
    background: #fff;

    transform: translateY(100%);
    transition: transform 0.3s ease;

    border-top-left-radius: 16px;
    border-top-right-radius: 16px;

    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);

    z-index: 9999;

    display: flex;
    flex-direction: column;
}

/* Active (visible) */
.guestflip-panel.active {
    transform: translateY(0);
}

/* Header */
.guestflip-header {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: right;
}

/* Close button */
.guestflip-header button {
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
}

/* Content area */
.guestflip-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* =========================
   MOBILE MODE ACTIVATION
========================= */
@media (max-width: 768px) {

    /* Hide desktop widget */
    .guestflip-wrapper {
        display: none;
    }

    /* Show toggle button */
    .guestflip-toggle {
        display: flex;
    }
}

/* =========================
   SAFETY (PREVENT OVERFLOW ISSUES)
========================= */
.guestflip-wrapper iframe,
.guestflip-panel iframe {
    max-width: 100% !important;
}

/* Prevent body scroll when panel open (optional JS hook) */
body.guestflip-open {
    overflow: hidden;
}