/* Broward Bark Scratch Game */
.bbs-page-bg-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background-size: cover;
    background-position: center top;
    background-repeat: repeat-y;
    min-height: 100vh;
    padding: 8px 0 20px 0;
}

.bbs-game-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 5px 5px 5px;
    box-sizing: border-box;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Card Background */
.bbs-card {
    max-width: 500px;
    margin: 0 auto;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 5px 10px;
}

/* Grid Layout - 2 columns everywhere */
.bbs-scratch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

/* Desktop: compact card */
@media (min-width: 601px) {
    .bbs-card {
        max-width: 440px;
    }
    .bbs-scratch-grid {
        max-width: 440px;
    }
}

/* Mobile: full width with breathing room */
@media (max-width: 600px) {
    .bbs-game-wrapper {
        padding: 2px 20px;
    }
    .bbs-scratch-grid {
        gap: 8px;
    }
    .bbs-card {
        padding: 4px 8px;
        border-radius: 8px;
    }
}

/* Individual Block - taller ratio for 3-line text */
.bbs-block {
    position: relative;
    width: 100%;
    padding-bottom: 80%;
    overflow: hidden;
    border-radius: 8px;
    background: #e0e0e0;
    cursor: pointer;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid #d0d0d0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.bbs-block.bbs-revealed {
    cursor: default;
}

/* Canvas overlay */
.bbs-scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    border-radius: 8px;
    touch-action: none;
}

.bbs-block.bbs-revealed .bbs-scratch-canvas {
    display: none;
}

/* Reveal content underneath */
.bbs-block-reveal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 4px 2px 4px;
    box-sizing: border-box;
    background: #fff;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.bbs-reveal-image-wrap {
    max-width: 95%;
    flex: 1;
    margin: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.bbs-reveal-image,
.bbs-block-reveal .bbs-reveal-image,
.bbs-block-reveal .bbs-reveal-image.perfmatters-lazy {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    display: block;
    object-fit: contain;
    clip-path: inset(0 round 8px) !important;
    border-radius: 8px !important;
}

.bbs-prize-text {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-top: 2px;
    margin-bottom: 2px;
    line-height: 1.2;
    min-height: 3.6em;
    flex-shrink: 0;
    padding: 0 4px;
}

.bbs-try-again-text {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    min-height: 3.6em;
    margin-top: 2px;
    margin-bottom: 2px;
    flex-shrink: 0;
    padding: 0 4px;
}

@media (max-width: 600px) {
    .bbs-block-reveal {
        padding: 3px 4px 1px 4px;
    }
    .bbs-reveal-image-wrap {
        flex: 1;
        max-height: none;
        margin: 0;
        min-height: 0;
    }
    .bbs-reveal-image,
    .bbs-block-reveal .bbs-reveal-image,
    .bbs-block-reveal .bbs-reveal-image.perfmatters-lazy {
        max-height: 100% !important;
    }
    .bbs-prize-text {
        font-size: 12px;
        min-height: 3.3em;
        margin-bottom: 0;
        margin-top: 1px;
        flex-shrink: 0;
        line-height: 1.1;
    }
    .bbs-try-again-text {
        font-size: 12px;
        min-height: 3.3em;
        margin-bottom: 0;
        margin-top: 1px;
        flex-shrink: 0;
        line-height: 1.1;
    }
}

/* Claim Button - centered in middle of block */
.bbs-claim-btn {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 18px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    touch-action: manipulation;
    z-index: 3;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.bbs-claim-btn:hover {
    background: #218838;
}

@media (max-width: 600px) {
    .bbs-claim-btn {
        padding: 7px 14px;
        font-size: 12px;
        top: calc(50% - 4px);
    }
}

/* Modal */
.bbs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px;
    padding-top: 10vh;
    box-sizing: border-box;
}

.bbs-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    max-width: 400px;
    width: 100%;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.bbs-modal-close {
    font-size: 26px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.bbs-modal-close:hover {
    color: #333;
}

.bbs-modal h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #333;
    text-align: center;
}

@media (max-width: 600px) {
    .bbs-modal {
        padding-top: 5vh;
    }
    .bbs-modal-content {
        padding: 12px 14px;
        max-height: 88vh;
    }
}

/* Form */
.bbs-form-group {
    margin-bottom: 7px;
    position: relative;
    z-index: 2;
}

.bbs-form-group label {
    display: block;
    margin-bottom: 2px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.bbs-form-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 2;
}

.bbs-form-group input::placeholder {
    color: #999;
    font-size: 14px;
}

.bbs-form-group input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
    position: relative;
    z-index: 2;
}

.bbs-submit-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
}

.bbs-submit-btn:hover {
    background: #218838;
}

.bbs-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Bouncing bone animation on FETCH button */
@keyframes bbsBoneLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}
@keyframes bbsBoneRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}
.bbs-bone-left, .bbs-bone-right {
    display: inline-block;
    font-size: 16px;
    vertical-align: middle;
}
.bbs-bone-left {
    animation: bbsBoneLeft 0.8s ease-in-out infinite;
    margin-right: 6px;
}
.bbs-bone-right {
    animation: bbsBoneRight 0.8s ease-in-out infinite;
    margin-left: 6px;
}

.bbs-form-message {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
    position: relative;
    z-index: 2;
    text-align: center;
}

.bbs-form-message.bbs-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bbs-form-message.bbs-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Confirmation */
.bbs-confirm-content {
    text-align: center;
    padding: 10px 14px;
}

.bbs-confirm-content h2 {
    color: #28a745;
    font-size: 20px;
    margin: 0 0 6px;
}

#bbs-confirm-details {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.3;
}

#bbs-confirm-details p {
    margin: 4px 0;
}

#bbs-confirm-details .bbs-coupon-code {
    display: inline-block;
    background: #f0f0f0;
    padding: 6px 16px;
    border: 2px dashed #28a745;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 6px 0;
}

.bbs-visit-link {
    margin-top: 8px;
    font-size: 13px;
}

.bbs-visit-link a {
    color: #28a745;
    font-weight: 600;
    text-decoration: underline;
}

.bbs-visit-link a:hover {
    color: #218838;
}

/* Play Again Button */
.bbs-play-again-btn {
    padding: 8px 24px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}

.bbs-play-again-btn:hover {
    background: #218838;
}

/* Centered claim info */
.bbs-claim-company {
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 2;
}

.bbs-claim-prize {
    text-align: center !important;
    font-size: 15px !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 2;
}

/* Newsletter checkbox */
.bbs-newsletter-group {
    margin-top: 4px !important;
    margin-bottom: 8px !important;
    position: relative;
    z-index: 2;
}

.bbs-newsletter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1;
}

.bbs-newsletter-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    vertical-align: middle;
    -webkit-appearance: checkbox;

/* Rules checkbox */
}
.bbs-rules-group {
    margin-top: 10px !important;
    margin-bottom: 4px !important;
    position: relative;
    z-index: 2;
}

.bbs-rules-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1;
}

.bbs-rules-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    vertical-align: middle;
    -webkit-appearance: checkbox;
}

.bbs-rules-label a {
    color: #28a745;
    text-decoration: underline;
}
    appearance: checkbox;
}

/* Share button */
.bbs-share-row {
    text-align: center;
}

.bbs-share-btn {
    padding: 6px 20px;
    background: #4267B2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}

.bbs-share-btn:hover {
    background: #365899;
}

.bbs-share-link {
    display: inline-block;
    padding: 5px 14px;
    margin: 4px 3px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.bbs-share-fb {
    background: #4267B2;
    color: #fff;
}

.bbs-share-fb:hover {
    background: #365899;
    color: #fff;
}

.bbs-share-copy {
    background: #6c757d;
    color: #fff;
}

.bbs-share-copy:hover {
    background: #5a6268;
}

.bbs-close-confirm-btn {
    padding: 8px 24px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    touch-action: manipulation;
}

/* Status Messages */
.bbs-message,
.bbs-error {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    max-width: 600px;
    margin: 20px auto;
}

/* Winners Ticker */
.bbs-winners-ticker {
    max-width: 500px;
    margin: 10px auto 0;
    text-align: center;
    min-height: 55px;
    position: relative;
}

.bbs-ticker-item {
    font-size: 13px;
    color: #555;
    font-weight: 500;
    padding: 6px 10px;
    transition: opacity 0.5s ease-in-out;
}

@media (min-width: 601px) {
    .bbs-winners-ticker {
        max-width: 440px;
    }
}

/* Footer Links */
.bbs-footer-links {
    text-align: center !important;
    font-size: 11px !important;
    color: #888 !important;
    margin: 0 !important;
    padding: 40px 0 10px 0 !important;
    font-weight: normal !important;
}

.bbs-footer-links a {
    color: #888;
    text-decoration: underline;
    font-weight: normal;
}

.bbs-footer-links a:hover {
    color: #555;
}
