/* ============================================================
   BAC Offer Panel Plugin - Responsive CSS
   ============================================================ */

/* --- Sticky Tab Button --- */
#bac-tab-btn {
    position: fixed;
    left: -38px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    z-index: 100001;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 2px -2px 10px rgba(0,0,0,0.25);
    border: none;
    white-space: nowrap;
    transition: left 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.4px;
}
#bac-tab-btn:hover {
    left: -30px;
}
.bac-tab-icon {
    display: inline-block;
    transform: rotate(90deg);
    font-size: 13px;
}

/* --- Backdrop Overlay --- */
#bac-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.18);
    z-index: 100000;
    cursor: pointer;
}
#bac-overlay.bac-overlay-on {
    display: block;
}

/* --- Slide-In Panel --- */
#bac-panel {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateX(-110%) translateY(-50%);
    transition: transform 0.36s cubic-bezier(0.4,0,0.2,1);
    width: 320px;
    max-width: 88vw;
    background: linear-gradient(155deg, #1e5c14 0%, #3d8c2e 100%);
    color: #fff;
    border-radius: 0 16px 16px 0;
    box-shadow: 6px 0 32px rgba(0,0,0,0.28);
    z-index: 100001;
    overflow: hidden;
    font-family: inherit;
}
#bac-panel.bac-panel-open {
    transform: translateX(0) translateY(-50%);
}

/* Top colour bar */
.bac-panel-top-bar {
    height: 5px;
    width: 100%;
}

/* Panel body */
.bac-panel-body {
    padding: 24px 22px 26px;
    position: relative;
}

/* Close button */
#bac-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 26px;
    height: 26px;
    line-height: 24px;
    text-align: center;
    font-size: 18px;
    background: rgba(0,0,0,0.22);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
}
#bac-close-btn:hover {
    background: rgba(0,0,0,0.45);
}

/* Heading */
.bac-heading {
    font-size: 17px;
    font-weight: 700;
    margin: 0 28px 6px 0;
    line-height: 1.35;
    color: #fff;
}

/* Subtext */
.bac-subtext {
    font-size: 13px;
    margin: 0 0 16px;
    opacity: 0.88;
    line-height: 1.5;
    color: #fff;
}

/* Input group */
.bac-input-group {
    position: relative;
    margin-bottom: 10px;
}
.bac-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.6;
    pointer-events: none;
}
#bac-offer-form input[type="text"],
#bac-offer-form input[type="email"] {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 34px;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    background: rgba(255,255,255,0.95);
    color: #333;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.2s;
    font-family: inherit;
}
#bac-offer-form input[type="text"]:focus,
#bac-offer-form input[type="email"]:focus {
    box-shadow: 0 0 0 2px #f0c040;
}

/* Error message */
.bac-error-msg {
    font-size: 12px;
    color: #ffe082;
    margin-bottom: 8px;
    min-height: 16px;
}

/* Submit button */
#bac-submit-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s;
    margin-top: 4px;
    font-family: inherit;
    letter-spacing: 0.3px;
}
#bac-submit-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
#bac-submit-btn:active {
    transform: translateY(0);
}
#bac-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success state */
.bac-success-box {
    text-align: center;
    padding: 10px 0 4px;
}
.bac-success-box h3 {
    font-size: 20px;
    margin: 0 0 8px;
    color: #fff;
}
.bac-success-box p {
    font-size: 14px;
    opacity: 0.9;
    color: #fff;
    margin: 0 0 10px;
}
.bac-coupon-code {
    display: inline-block;
    background: #f0c040;
    color: #1a3a0f;
    font-size: 20px;
    font-weight: 800;
    padding: 6px 18px;
    border-radius: 6px;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    #bac-panel {
        width: 290px;
        max-width: 86vw;
    }
    #bac-tab-btn {
        font-size: 11px;
        padding: 8px 14px;
        left: -35px;
    }
    .bac-heading { font-size: 15px; }
}

@media (max-width: 360px) {
    #bac-panel {
        width: 270px;
        max-width: 84vw;
    }
}
