.scb-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999999;
    /* Boost z-index just in case */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.scb-top-bar.scb-absolute {
    position: absolute !important;
}

body.admin-bar .scb-top-bar {
    top: 32px;
    /* Adjust for WP Admin Bar */
}

@media screen and (max-width: 782px) {
    body.admin-bar .scb-top-bar {
        top: 46px;
    }
}

.scb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 40px 10px 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.scb-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.scb-left {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scb-message {
    display: inline-block;
    animation: fadeIn 0.5s ease-in-out;
}

.scb-right {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .scb-desktop-only {
        display: none !important;
    }

    .scb-mobile-trigger {
        display: inline-block !important;
    }

    .scb-container {
        padding: 5px 10px;
        min-height: auto;
    }

    .scb-content {
        gap: 5px;
        flex-wrap: wrap;
        /* Allow flex wrapping */
        justify-content: space-between;
    }

    .scb-left {
        font-size: 14px;
        /* Smaller font to fit more */
        white-space: normal;
        /* Allow wrapping */
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        text-align: left;
        flex: 1;
        /* Take available space */
    }

    .scb-right {
        flex: 0 0 auto;
        /* Don't shrink */
    }
}

.scb-mobile-trigger {
    display: none;
    /* Hidden by default on desktop */
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
}

/* Modal Styles */
.scb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease;
}

.scb-modal {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease;
    color: #333;
    font-family: inherit;
}

.scb-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    z-index: 10;
}

.scb-modal-content {
    padding: 30px 25px;
    text-align: center;
}

.scb-modal h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.scb-modal p {
    margin: 0 0 20px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #666;
}

.scb-form-modal {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scb-form-modal input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.scb-form-modal button {
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    transition: opacity 0.2s;
}

.scb-form-modal button:hover {
    opacity: 0.9;
}

/* Modal Success State */
.scb-coupon-box-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

.scb-coupon-code-large {
    font-family: monospace;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #333;
}

.scb-copy-btn-large {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    padding: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Form Styles */
.scb-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scb-form input[type="email"] {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    outline: none;
    min-width: 200px;
}

.scb-form button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.scb-form button:hover {
    opacity: 0.9;
}

/* Success State */
.scb-success {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 14px;
}

.scb-coupon-code {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    font-family: monospace;
}

.scb-copy-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

/* Bottom Bar (Mobile Only) */
.scb-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999999;
    padding: 15px 50px 15px 20px;
    /* Added right padding for safety */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.scb-bottom-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

@media (min-width: 769px) {
    .scb-bottom-bar {
        display: none !important;
    }
}

/* Close Button Mobile */
.scb-close {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    /* Large touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
}