/**
 * Top 5 Comparison Table Styles
 * Visually distinct from main comparison table
 */

/* Hide featured image in header for software/payment_option pages */
.single-software .featured-image,
.single-software .post-image,
.single-payment_option .featured-image,
.single-payment_option .post-image {
    display: none !important;
}

.wmc-top5-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 24px 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    clear: both !important;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
}

.wmc-top5-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #dee2e6;
}

.wmc-top5-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #212529;
    flex: 1;
    min-width: 200px;
}

.wmc-top5-header .besafe {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wmc-top5-header .gambleaware {
    height: auto;
    width: 120px;
    max-height: 24px;
    object-fit: contain;
}

.wmc-top5-header .eighteenplus {
    height: 24px;
    width: 24px;
    flex-shrink: 0;
    margin-right: 8px;
}

.wmc-top5-intro {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
    margin: 0 0 20px 0;
    padding: 0;
}

.wmc-top5-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wmc-top5-item {
    display: grid;
    grid-template-columns: 50px 100px 1fr auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wmc-top5-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Rank badge styles */
.wmc-top5-rank {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: bold;
    color: #fff;
}

/* Different colors for each rank */
.wmc-top5-item[data-rank="1"] .rank-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.wmc-top5-item[data-rank="2"] .rank-badge {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.wmc-top5-item[data-rank="3"] .rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.wmc-top5-item[data-rank="4"] .rank-badge,
.wmc-top5-item[data-rank="5"] .rank-badge {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

/* Logo styles */
.wmc-top5-logo {
    position: relative;
}

.wmc-top5-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
}

.wmc-top5-logo .ribbon {
    position: absolute;
    top: -8px;
    left: -8px;
    font-size: 0.65rem;
}

/* Info section */
.wmc-top5-info {
    min-width: 0;
}

.wmc-top5-name {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.wmc-top5-name a {
    color: #212529;
    text-decoration: none;
}

.wmc-top5-name a:hover {
    color: #0d6efd;
}

.wmc-top5-bonus {
    font-size: 1rem;
    color: #198754;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Strip any stray p tags from bonus content */
.wmc-top5-bonus p {
    display: inline;
    margin: 0;
    padding: 0;
}

.wmc-top5-bonus .bonus-value {
    font-size: 1.25rem;
}

.wmc-top5-terms {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.4;
}

.wmc-top5-terms .terms-text {
    display: block;
    margin-bottom: 4px;
}

.wmc-top5-terms .terms-link {
    color: #0d6efd;
    text-decoration: underline;
    font-size: 0.75rem;
}

/* CTA section */
.wmc-top5-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.wmc-top5-button {
    display: inline-block !important;
    background: linear-gradient(135deg, #157347 0%, #0f5c38 100%) !important;
    color: #ffffff !important;
    padding: 12px 24px 12px 24px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wmc-top5-button:link,
.wmc-top5-button:visited,
.wmc-top5-button:active {
    color: #ffffff !important;
    padding: 12px 24px 12px 24px !important;
    line-height: 1 !important;
}

.wmc-top5-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
    color: #fff !important;
}

.wmc-top5-review-link {
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: underline;
}

.wmc-top5-review-link:hover {
    color: #0d6efd;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wmc-top5-container {
        padding: 16px;
        margin-bottom: 24px;
    }

    .wmc-top5-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .wmc-top5-item {
        display: block;
        padding: 12px;
        position: relative;
    }

    .wmc-top5-rank {
        position: absolute;
        top: 12px;
        left: 12px;
    }

    .rank-badge {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .wmc-top5-logo {
        float: left;
        margin: 0 12px 8px 36px;
    }

    .wmc-top5-logo img {
        width: 60px;
        height: 60px;
    }

    .wmc-top5-info {
        overflow: hidden;
    }

    .wmc-top5-cta {
        clear: both;
        flex-direction: row;
        justify-content: center;
        padding-top: 8px;
    }

    .wmc-top5-button {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .wmc-top5-name {
        font-size: 1rem;
    }

    .wmc-top5-bonus {
        font-size: 0.9rem;
    }

    .wmc-top5-terms {
        font-size: 0.7rem;
    }
}
