/**
 * Kinkly Toplist Frontend Styles
 */

.kinkly-toplist {
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center; /* Center align the container */
    max-width: 800px;
}

.kinkly-toplist h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.kinkly-toplist-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.kinkly-toplist-table th,
.kinkly-toplist-table td {
    padding: 15px;
    text-align: center; /* Center align all text */
    border: 1px solid #ddd; /* Add borders to all sides for grid lines */
    vertical-align: middle;
}

.kinkly-toplist-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.kinkly-toplist-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Logo column */
.logo-column {
    width: 100px;
    text-align: center;
    vertical-align: middle;
}

.logo-column img {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
}

.kinkly-affiliate-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto;
}

/* Name column */
.name-column {
    font-weight: 500;
    color: #ff6b35; /* Orange color to match design */
    vertical-align: middle;
}

/* Action column */
.action-column {
    width: 150px;
    text-align: center;
    vertical-align: middle;
}

.visit-button {
    background-color: #ff0000;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.visit-button:hover {
    background-color: #cc0000;
    color: white;
    text-decoration: none;
}

/* Mobile responsive card layout */
.kinkly-toplist-mobile {
    display: none; /* Hidden by default, shown only on mobile */
}

@media (max-width: 768px) {
    /* Hide table on mobile */
    .kinkly-toplist-table {
        display: none !important;
    }
    
    /* Show mobile card layout */
    .kinkly-toplist-mobile {
        display: block !important;
        padding: 10px;
    }
    
    .kinkly-toplist-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border: 1px solid #e0e0e0;
        text-align: center;
    }
    
    .kinkly-toplist-card .affiliate-name {
        font-size: 18px;
        font-weight: 500;
        color: #ff6b35;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .kinkly-toplist-card .affiliate-logo {
        width: 60px;
        height: 60px;
        object-fit: contain;
        border-radius: 8px;
        margin: 0 auto 15px auto;
        display: block;
    }
    
    .kinkly-toplist-card .logo-placeholder {
        width: 60px;
        height: 60px;
        background: #f5f5f5;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin: 0 auto 15px auto;
    }
    
    .kinkly-toplist-card .visit-button {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        font-weight: 600;
        background-color: #ff0000;
        color: white;
        border: none;
        border-radius: 8px;
        text-decoration: none;
        display: block;
        text-align: center;
        transition: background-color 0.3s ease;
        box-sizing: border-box;
    }
    
    .kinkly-toplist-card .visit-button:hover {
        background-color: #e60000;
    }
}