/*
 * Casino Sticky Bar - Main Frontend Stylesheet
 * Version: 2.2.0
 */

/* --- Sticky Bar Styles --- */
#csb-sticky-bar {
    position: fixed !important; /* The !important tag ensures this rule overrides theme styles */
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #1a202c, #2d3748);
    color: #ffffff;
    padding: 15px 25px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transform: translateY(100%); /* Initially hidden for animation */
    animation: slideUp 0.5s ease-out forwards;
    padding-bottom: 25px; /* Add padding to make space for T&C line */
}

#csb-sticky-bar .csb-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

#csb-sticky-bar .csb-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.csb-text {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.csb-button {
    background-color: #f5b301;
    color: #1a202c;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.csb-button:hover {
    background-color: #ffc940;
    transform: translateY(-2px);
}

.csb-close {
    position: absolute;
    top: 15px; /* Adjust for padding */
    right: 20px;
    transform: translateY(0);
    font-size: 28px;
    font-weight: bold;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.csb-close:hover {
    color: #ffffff;
}

/* --- Modal Popup Styles --- */
#csb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 32, 44, 0.8);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    animation: fadeIn 0.3s ease-out forwards;
}

#csb-modal-overlay[data-csb-trigger="exit_intent"],
#csb-modal-overlay[data-csb-trigger="scroll"],
#csb-modal-overlay[data-csb-trigger="time_delay"] {
    display: none;
    animation: none;
}

#csb-modal-overlay[data-csb-trigger="exit_intent"].csb-is-visible,
#csb-modal-overlay[data-csb-trigger="scroll"].csb-is-visible,
#csb-modal-overlay[data-csb-trigger="time_delay"].csb-is-visible {
    display: flex;
    animation: fadeIn .3s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        visibility: visible;
    }
}

#csb-modal-content {
    background: #2d3748;
    color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    animation: scaleUp 0.3s ease-out forwards;
}

@keyframes scaleUp {
    to {
        transform: scale(1);
    }
}

.csb-modal-text {
    font-size: 22px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 25px;
    line-height: 1.4;
}

#csb-modal-content .csb-button {
    font-size: 18px;
    padding: 12px 25px;
}

#csb-modal-content .csb-close {
    position: absolute;
    top: 10px;
    right: 15px;
    transform: none;
}


/* --- Terms & Conditions Styles --- */
.csb-terms-line {
    font-size: 12px;
    opacity: 0.8;
    position: relative;
    text-align: center;
}
#csb-sticky-bar .csb-terms-line {
    width: 100%;
    position: absolute;
    bottom: 0; /* Position at the very bottom */
    left: 0;
    font-size: 11px;
    color: #ccc;
    background-color: #2d3748; /* Match bar color */
    padding: 3px 0;
}
#csb-modal-content .csb-terms-line {
    margin-top: 15px;
}
.csb-tnc-trigger {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
}
.csb-tnc-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-width: 90vw;
    background-color: #333;
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.csb-tnc-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}
.csb-tnc-tooltip.is-visible {
    visibility: visible;
    opacity: 1;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    #csb-sticky-bar {
        padding: 15px 15px 25px 15px; /* Adjust padding for T&C */
        text-align: center;
    }
    .csb-content {
        flex-direction: column;
        gap: 12px;
    }
    .csb-close {
        top: 10px;
        right: 10px;
        transform: none;
    }
}