/**
 * Exit Intent Popup Styles
 */

.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.exit-popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 780px;
    width: 90%;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    animation: exitPopupSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 20px auto;
}

/* Only show scrollbar if content actually overflows */
.exit-popup-container::-webkit-scrollbar {
    width: 6px;
}

.exit-popup-container::-webkit-scrollbar-track {
    background: transparent;
}

.exit-popup-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.exit-popup-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

@keyframes exitPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    color: #555;
}

.exit-popup-close:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: rotate(90deg) scale(1.1);
    color: #000;
}

.exit-popup-close svg {
    width: 20px;
    height: 20px;
}

.exit-popup-header {
    text-align: center;
    padding: 24px 30px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

.exit-popup-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.exit-popup-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.exit-popup-casinos {
    padding: 18px 15px;
    background: #ffffff;
}

.exit-popup-casinos .row {
    display: flex;
    flex-wrap: wrap;
    margin: -6px;
    justify-content: center;
    align-items: flex-start; /* Align to top to prevent stretching */
    gap: 0;
}

.exit-popup-casinos .row > [class*="col-"] {
    padding: 6px;
    display: flex;
}

/* Ensure casino cards fit nicely in popup - 3 columns on desktop, smaller */
.exit-popup-casinos .row .col-md-3,
.exit-popup-casinos .row .col-lg-3,
.exit-popup-casinos .row .col-sm-6,
.exit-popup-casinos .row .col-12 {
    flex: 0 0 calc(33.333% - 12px);
    max-width: calc(33.333% - 12px);
    min-width: 0;
}

/* Make casino cards more compact without scaling */
.exit-popup-casinos .casino-filter__item,
.exit-popup-casinos .casino-filter__outer {
    height: auto; /* Changed from 100% to auto to prevent stretching */
    min-height: auto;
    margin-bottom: 0;
    border-radius: 8px;
    overflow: visible; /* Changed to visible so top banner shows */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative; /* Ensure positioning context for col-bar */
}

.exit-popup-casinos .casino-filter__item:hover,
.exit-popup-casinos .casino-filter__outer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.exit-popup-casinos .filter-item__col {
    margin-bottom: 0;
    height: auto; /* Changed from 100% to auto */
    position: relative; /* Ensure positioning context */
    overflow: visible; /* Allow top banner to show */
}

.exit-popup-casinos .casino-filter__outer {
    overflow: visible; /* Allow top banner to show */
}

/* Fix top banner (col-bar) display in exit popup */
.exit-popup-casinos .col-bar {
    position: absolute !important;
    z-index: 10 !important;
    top: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 90% !important;
    white-space: nowrap !important;
    overflow: visible !important;
    display: block !important;
}

.exit-popup-casinos .col-bar .top-h {
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 14px !important;
    padding: 3px 10px !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: ellipsis !important;
}

/* Optimize casino card content for popup - smaller overall */
.exit-popup-casinos .casino-filter__item {
    font-size: 0.85em;
}

.exit-popup-casinos .casino-filter__item h3,
.exit-popup-casinos .casino-filter__item .casino-title,
.exit-popup-casinos .casino-filter__item .item-title {
    font-size: 0.9em !important;
    line-height: 1.25 !important;
    margin-bottom: 5px !important;
}

.exit-popup-casinos .casino-filter__item .rating,
.exit-popup-casinos .casino-filter__item .stars,
.exit-popup-casinos .casino-filter__item .house_review {
    font-size: 0.82em !important;
}

.exit-popup-casinos .casino-filter__item .bonus-text,
.exit-popup-casinos .casino-filter__item .bonus_description {
    font-size: 0.8em !important;
    line-height: 1.35 !important;
}

.exit-popup-casinos .casino-filter__item .btn,
.exit-popup-casinos .casino-filter__item button,
.exit-popup-casinos .casino-filter__item a.button {
    font-size: 0.85em !important;
    padding: 8px 14px !important;
}

.exit-popup-footer {
    padding: 14px 30px 18px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.exit-popup-disclaimer {
    font-size: 11px;
    color: #999;
    margin: 0;
    letter-spacing: 0.3px;
}

/* Prevent body scroll when popup is active */
body.exit-popup-active {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

/* Responsive */
@media (max-width: 992px) {
    .exit-popup-container {
        max-width: 92%;
        margin: 15px auto;
        max-height: 96vh;
    }
    
    .exit-popup-header {
        padding: 22px 25px 14px;
    }
    
    .exit-popup-header h2 {
        font-size: 23px;
    }
    
    .exit-popup-header p {
        font-size: 13px;
    }
    
    .exit-popup-casinos {
        padding: 18px 15px;
    }
    
    .exit-popup-casinos .row {
        margin: -5px;
    }
    
    .exit-popup-casinos .row > [class*="col-"] {
        padding: 5px;
    }
    
    .exit-popup-casinos .row .col-md-3,
    .exit-popup-casinos .row .col-lg-3,
    .exit-popup-casinos .row .col-sm-6 {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    
    .exit-popup-casinos .col-bar .top-h {
        font-size: 9px !important;
        padding: 2px 8px !important;
    }
    
    .exit-popup-footer {
        padding: 14px 25px 18px;
    }
}

@media (max-width: 768px) {
    .exit-popup-overlay {
        padding: 10px;
    }
    
    .exit-popup-container {
        max-width: 100%;
        border-radius: 10px;
        max-height: 98vh;
        margin: 10px auto;
    }
    
    .exit-popup-header {
        padding: 20px 20px 12px;
    }
    
    .exit-popup-header h2 {
        font-size: 21px;
        margin-bottom: 5px;
    }
    
    .exit-popup-header p {
        font-size: 13px;
    }
    
    .exit-popup-casinos {
        padding: 15px 10px;
    }
    
    .exit-popup-casinos .row {
        margin: -4px;
    }
    
    .exit-popup-casinos .row > [class*="col-"] {
        padding: 4px;
    }
    
    .exit-popup-casinos .row .col-md-3,
    .exit-popup-casinos .row .col-lg-3,
    .exit-popup-casinos .row .col-sm-6,
    .exit-popup-casinos .row .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .exit-popup-casinos .col-bar {
        top: -6px !important;
        max-width: 85% !important;
    }
    
    .exit-popup-casinos .col-bar .top-h {
        font-size: 9px !important;
        padding: 2px 7px !important;
        line-height: 12px !important;
    }
    
    .exit-popup-footer {
        padding: 12px 20px 16px;
    }
    
    .exit-popup-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }
    
    .exit-popup-close svg {
        width: 18px;
        height: 18px;
    }
}

