/* --- TAB (vertical pill on right edge) --- */
.taw-wgsb-tab {
    position: fixed;
    top: 45%;
    right: 0;
    transform: translateY(-50%);
    z-index: 998;  /* below WhatsApp btn (200) but above most content; below budget-calc exit popup (99999) */
    background: linear-gradient(135deg, #c89405 0%, #d4a829 100%);
    color: #fff;
    border: none;
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
    padding: 18px 10px 18px 12px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: -4px 6px 20px rgba(0,0,0,0.25), -1px 0 4px rgba(200,148,5,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
    min-width: 48px;
    animation: tawWgsbPulse 2.4s ease-in-out 2s 3;
}
.taw-wgsb-tab:hover {
    transform: translateY(-50%) translateX(-4px);
    box-shadow: -8px 8px 28px rgba(0,0,0,0.3), -2px 0 6px rgba(200,148,5,0.5);
    padding-left: 16px;
}
.taw-wgsb-tab-icon {
    font-size: 22px;
    line-height: 1;
    letter-spacing: 0;
}
.taw-wgsb-tab-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    font-weight: 700;
    font-size: 10.5px;
}
.taw-wgsb-tab-sub {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    font-size: 8.5px;
    opacity: 0.85;
    letter-spacing: 1.5px;
    font-weight: 500;
}
@keyframes tawWgsbPulse {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(-6px); }
}
#tawWgsbRoot[data-state="open"] .taw-wgsb-tab { opacity: 0; pointer-events: none; }

/* --- PANEL --- */
.taw-wgsb-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 92vw;
    z-index: 10000;
    background: linear-gradient(160deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #fff;
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-family: 'DM Sans', Arial, sans-serif;
}
.taw-wgsb-panel:before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a67b04, #c89405, #d4a829, #c89405);
}
#tawWgsbRoot[data-state="open"] .taw-wgsb-panel {
    transform: translateX(0);
}
.taw-wgsb-panel[aria-hidden="false"] { transform: translateX(0); }

.taw-wgsb-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}
.taw-wgsb-close:hover { background: rgba(255,255,255,0.16); color: #fff; }

.taw-wgsb-inner {
    padding: 38px 36px 32px;
}

.taw-wgsb-book {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(200,148,5,0.4);
    border-radius: 4px 10px 10px 4px;
    padding: 28px 22px;
    width: 164px;
    aspect-ratio: 1 / 1.4;
    margin: 0 auto 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: -12px 12px 30px rgba(0,0,0,0.45), -4px 4px 10px rgba(0,0,0,0.3);
    transform: rotateY(-8deg);
    perspective: 800px;
    overflow: hidden;
}
.taw-wgsb-book:before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0,0,0,0.5), transparent);
}
.taw-wgsb-book-tag { color: #c89405; font-size: 6.5px; letter-spacing: 2px; font-weight: 600; text-align: center; text-transform: uppercase; }
.taw-wgsb-book-rule { width: 26px; height: 1px; background: #c89405; margin: 8px auto; position: relative; }
.taw-wgsb-book-rule:after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 4px; height: 4px; background: #c89405; border-radius: 50%; }
.taw-wgsb-book-title { font-family: 'Cormorant Garamond', Georgia, serif; color: #fff; font-size: 19px; text-align: center; line-height: 1.05; font-weight: 600; }
.taw-wgsb-book-title em { font-style: italic; color: #d4a829; font-weight: 500; }
.taw-wgsb-book-bot { text-align: center; color: rgba(255,255,255,0.55); font-size: 6.5px; letter-spacing: 1.5px; text-transform: uppercase; }
.taw-wgsb-book-bot strong { display: block; color: #d4a829; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 9px; font-weight: 600; margin-bottom: 2px; text-transform: none; letter-spacing: 0.5px; }

.taw-wgsb-eyebrow { display: block; text-align: center; color: #d4a829; font-size: 10px; letter-spacing: 2.5px; font-weight: 600; margin-bottom: 10px; }
.taw-wgsb-title { font-family: 'Cormorant Garamond', Georgia, serif; color: #fff; font-size: 28px; line-height: 1.12; text-align: center; margin: 0 0 14px; font-weight: 600; }
.taw-wgsb-title em { font-style: italic; color: #d4a829; font-weight: 500; }
.taw-wgsb-lead { text-align: center; font-size: 13.5px; line-height: 1.7; color: rgba(255,255,255,0.78); margin: 0 0 22px; }

.taw-wgsb-feats { list-style: none; padding: 0; margin: 0 0 26px; }
.taw-wgsb-feats li { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.85); }
.taw-wgsb-feats li i { color: #c89405; font-size: 11px; margin-top: 5px; flex-shrink: 0; }

.taw-wgsb-form { margin-top: 4px; }
.taw-wgsb-field { margin-bottom: 14px; }
.taw-wgsb-field label { display: block; font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 6px; font-weight: 500; }
.taw-wgsb-field input {
    width: 100%;
    padding: 13px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}
.taw-wgsb-field input:focus, .taw-wgsb-field select:focus { outline: none; border-color: #c89405; background: rgba(255,255,255,0.08); }
.taw-wgsb-field input::placeholder { color: rgba(255,255,255,0.35); }
.taw-wgsb-lbl-hint { color: rgba(255,255,255,0.4); font-size: 9px; letter-spacing: 0.5px; text-transform: none; font-weight: 400; margin-left: 4px; }

/* Mobile number row: country code dropdown + number input */
.taw-wgsb-mobile-row { display: grid; grid-template-columns: 108px 1fr; gap: 8px; }
.taw-wgsb-cc {
    padding: 13px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23c89405'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 26px;
    cursor: pointer;
}
.taw-wgsb-cc option { background: #1a1a1a; color: #fff; }

.taw-wgsb-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #c89405 0%, #d4a829 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 6px 18px rgba(200,148,5,0.3);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.taw-wgsb-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(200,148,5,0.4); }
.taw-wgsb-cta:disabled { opacity: 0.55; cursor: wait; }
.taw-wgsb-trust { text-align: center; margin-top: 14px; font-size: 11px; color: rgba(255,255,255,0.45); letter-spacing: 0.3px; }
.taw-wgsb-trust i { color: #c89405; margin-right: 4px; }
.taw-wgsb-maybe-later {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}
.taw-wgsb-maybe-later:hover { color: rgba(255,255,255,0.85); }

.taw-wgsb-success { text-align: center; padding: 12px 0 20px; }
.taw-wgsb-check {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #c89405, #d4a829);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin: 0 auto 18px;
}
.taw-wgsb-success h4 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 24px; color: #fff; margin: 0 0 10px; font-weight: 600; }
.taw-wgsb-success p { font-size: 13.5px; color: rgba(255,255,255,0.75); line-height: 1.6; margin: 0 0 16px; }
.taw-wgsb-success-link { color: #d4a829; font-size: 13px; text-decoration: none; border-bottom: 1px solid rgba(212,168,41,0.4); padding-bottom: 2px; }
.taw-wgsb-success-link:hover { color: #fff; border-bottom-color: #fff; }

/* --- BACKDROP --- */
.taw-wgsb-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}
#tawWgsbRoot[data-state="open"] .taw-wgsb-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* --- MOBILE (<=899px) --- */
@media (max-width: 899px) {
    /* Compact tab, vertically centered on right edge - well clear of WhatsApp btn (bottom:24px) */
    .taw-wgsb-tab {
        top: 50%;
        bottom: auto;
        right: 0;
        transform: translateY(-50%);
        padding: 12px 8px 12px 10px;
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
        min-width: 38px;
        gap: 5px;
    }
    .taw-wgsb-tab:hover { transform: translateY(-50%) translateX(-3px); }
    .taw-wgsb-tab-icon { font-size: 18px; }
    .taw-wgsb-tab-text { font-size: 9px; letter-spacing: 1.5px; }
    .taw-wgsb-tab-sub { font-size: 7.5px; letter-spacing: 1px; }
    @keyframes tawWgsbPulse {
        0%, 100% { transform: translateY(-50%) translateX(0); }
        50% { transform: translateY(-50%) translateX(-6px); }
    }

    /* Panel becomes a full-width overlay */
    .taw-wgsb-panel {
        width: 100vw;
        max-width: 100vw;
    }
    .taw-wgsb-inner {
        padding: 52px 22px 28px; /* extra top padding so content doesn't collide with the bigger close btn */
    }

    /* Bigger, higher-contrast close button on mobile */
    .taw-wgsb-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        background: rgba(255,255,255,0.14);
        color: #fff;
        font-size: 26px;
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }
    .taw-wgsb-close:hover, .taw-wgsb-close:active { background: rgba(200,148,5,0.35); border-color: #c89405; }

    .taw-wgsb-book {
        width: 130px;
        padding: 20px 16px;
        margin: 0 auto 20px;
    }
    .taw-wgsb-book-title { font-size: 16px; }
    .taw-wgsb-title { font-size: 24px; }
    .taw-wgsb-lead { font-size: 13px; }
    .taw-wgsb-feats li { font-size: 12.5px; }
    .taw-wgsb-mobile-row { grid-template-columns: 96px 1fr; }
    .taw-wgsb-cc { font-size: 12.5px; padding: 13px 24px 13px 8px; }
    .taw-wgsb-maybe-later { font-size: 13px; padding: 14px; }
}
