/* Reset container queries completely for mobile devices */
.ranking-container {
    max-width: 1200px;
    margin: 0 auto;
}

.main-title {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.main-title h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-title p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Mobile-first base styles - NO container queries initially */
/* Default (light mode) */
.ranking-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.6s ease forwards;
}

/* Make the entire block solid black in dark mode, no border */
.ranking-block-dark .ranking-item {
    background: #232323 !important;
    border: none !important;
    box-shadow: 0 5px 10px rgba(0,0,0,0.10);
}

.ranking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ad2e34, #cb7979, #000000);
}

/* Default mobile layout - stacked vertically */
.ranking-item .ranking-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.ranking-item .logo-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px;
    border-radius: 15px;
    position: relative;
    border: 1px solid #e5e1e1;
    justify-content: center;
}

.ranking-item .info-column {
    width: 100%;
    padding: 0;
}

.ranking-item .action-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

/* Only add container queries for larger screens with better support */
@media screen and (min-width: 768px) {
    .ranking-item {
        container-type: inline-size;
    }

    .ranking-item .ranking-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 20px;
        flex-wrap: nowrap;
    }

    .ranking-item .logo-column {
        width: 25%;
        margin-bottom: 0;
    }

    .ranking-item .info-column {
        width: 55%;
        margin-bottom: 0;
        padding: 0 15px;
    }

    .ranking-item .action-column {
        width: 20%;
    }
}

/* Container-based responsive design - ONLY for desktop */
@container (min-width: 400px) {
    .ranking-item .ranking-row {
        gap: 8px;
        padding: 20px;
    }

    .ranking-item .logo-column {
        width: 28%;
    }

    .ranking-item .info-column {
        width: 52%;
        padding: 0 8px;
    }

    .ranking-item .action-column {
        width: 20%;
    }
}

@container (min-width: 500px) {
    .ranking-item .ranking-row {
        gap: 10px;
        padding: 22px;
    }

    .ranking-item .logo-column {
        width: 26%;
    }

    .ranking-item .info-column {
        width: 54%;
        padding: 0 10px;
    }

    .ranking-item .action-column {
        width: 20%;
    }
}

@container (min-width: 600px) {
    .ranking-item .ranking-row {
        gap: 12px;
        padding: 25px;
    }

    .ranking-item .logo-column {
        width: 25%;
    }

    .ranking-item .info-column {
        width: 55%;
        padding: 0 12px;
    }

    .ranking-item .action-column {
        width: 20%;
    }
}

@container (min-width: 700px) {
    .ranking-item .ranking-row {
        gap: 15px;
        padding: 20px;
    }

    .ranking-item .logo-column {
        width: 24%;
    }

    .ranking-item .info-column {
        width: 54%;
        padding: 0 15px;
    }

    .ranking-item .action-column {
        width: 22%;
    }
    .ranking-item{
        border-radius: 10px;
    }

}

/* Force mobile layout for ALL devices under 768px */
@media screen and (max-width: 767px) {
    .ranking-item {
        container-type: normal !important;
    }

    .ranking-item .ranking-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 20px !important;
        flex-wrap: nowrap !important;
    }

    .ranking-item .logo-column,
    .ranking-item .info-column,
    .ranking-item .action-column {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .ranking-item .logo-column {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 15px 10px !important;
        border-radius: 15px !important;
        border: 1px solid #e5e1e1 !important;
    }

    .ranking-item .action-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .ranking-item .rating-review-combined {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    /* Ensure text sizing works on iOS */
    .ranking-item .bonus-text {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100% !important;
    }

    .ranking-item .bonus-text h2 {
        font-size: 20px !important;
        -webkit-text-size-adjust: 100% !important;
    }
}

/* Extra specific iPhone fixes */
@media screen and (max-width: 480px) {
    .ranking-item {
        container-type: normal !important;
    }

    .ranking-item .ranking-row {
        padding-top: 25px !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-appearance: none) {
    @media screen and (max-width: 767px) {
        .ranking-item {
            -webkit-transform: translateZ(0);
        }

        .ranking-item .ranking-row {
            -webkit-flex-direction: column !important;
            -ms-flex-direction: column !important;
            flex-direction: column !important;
        }
    }
}

/* Logo and badge styling */
.ranking-item .ranking-badge {
    position: absolute;
    top: -15px;
    left: -15px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 400;
    font-size: 18px;
    box-shadow: 0 8px 16px rgba(30, 64, 175, 0.4);
    border: 3px solid #fff;
}

.ranking-item .sportsbook-logo {
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
    width: 100%;
}


/* Rating and review section */
.ranking-item .rating-review-combined {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ranking-item .rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    width: fit-content;
    box-shadow: 0 4px 12px rgb(203 203 203 / 30%);
    flex-shrink: 0;
}

.ranking-item .rating-score {
    font-size: 14px;
    font-weight: bold;
    color: #1a1a1a;
}

.ranking-item .stars {
    color: #1a1a1a;
    font-size: 12px;
}

.ranking-item .review-section {
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 0;
}

.ranking-item .magical-review-link {
    color: #1e40af;
    text-decoration: underline;
    display: inline-block;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0;
    border-radius: 4px;
    font-size: 12px;
}

.ranking-item .magical-review-link:hover {
    color: #3b82f6;
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.8);
}

.ranking-item .review-text {
    color: #1e40af;
    font-size: 12px;
    font-weight: 400;
    text-decoration: underline;
}

.ranking-item .bonus-text {
    /* color: #4a5568; */
    color: #4a5568;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
}
.bonus-text p {
   font-size: 1rem !important;
}

.ranking-item .bonus-text h2 {
    font-size: 20px;
    color: #4a5568;
    font-weight: bold;
    margin: 0;
}

.ranking-item .bonus-highlight {
    color: #e53e3e;
    font-weight: bold;
}

/* Action column - code field and buttons */
.ranking-item .code-field {
    display: flex;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.ranking-item .code-field:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.ranking-item .code-input {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: #1a365d;
    transition: background 0.3s ease;
    pointer-events: none;
    min-width: 0;
    padding-right: 42px;
}

.ranking-item .code-input:focus {
    outline: none;
    background: #ffffff;
}

.ranking-item .copy-btn {
    background: #000;
    color: white;
    border: none;
    padding: 12px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    top: 0;
    right: 0;
}


.ranking-item .copy-btn i {
    font-size: 14px;
}

.ranking-item .get-bonus-btn {
    background: #ad2e34;
    color: white;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(173, 46, 52, 0.3);
    font-size: 12px;
    line-height: 1.2;
}

/* Stars styling */
.stars .star {
    display: inline-block;
    font-size: 16px;
    margin-right: 2px;
}

.stars .star.full {
    color: #ffd700;
}

.stars .star.half {
    color: #ffd700;
    position: relative;
}

.stars .star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #ffd700;
}

.stars .star.empty {
    color: #ddd;
}

/* Disclaimer */
.ranking-item .disclaimer {
    background: rgba(0, 0, 0, 0.05);
    padding: 15px 30px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Copy notification */
.copied-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    display: none;
    opacity: 0;
}

.copied-notice.show {
    transform: translateX(0);
    display: block;
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ranking-item:nth-child(2) { animation-delay: 0.1s; }
.ranking-item:nth-child(3) { animation-delay: 0.2s; }
.ranking-item:nth-child(4) { animation-delay: 0.3s; }
.ranking-item:nth-child(5) { animation-delay: 0.4s; }
.ranking-item:nth-child(6) { animation-delay: 0.5s; }

/* Preview styling for block editor */
.ranking-block-preview {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    .main-title h1 {
        font-size: 2.5rem;
    }

    .ranking-item .ranking-row {
        padding: 15px;
    }

    .ranking-item .info-column {
        padding: 0;
                display: flex
;
        /* justify-content: center; */
        align-items: center;
        flex-direction: column;
    }

    .ranking-item .rating-review-combined {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
@media screen and (max-width: 480px){
    .ranking-item .ranking-row{
        padding-top: 25px;
    }
}