/*
Theme Name: NewsUp TGB
Template: newsup
Description: Custom NewsUp theme for The Gaming Boardroom with TGB access control
Version: 1.0.0
Author: TGB Development Team
*/

@import url("../newsup/style.css");

/* TGB Custom Styles */

/* Access level badges */
.tgb-access-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.tgb-access-badge.tgb-free-access { 
    background: #28a745; 
    color: white; 
}
.tgb-access-badge.tgb-pro-access { 
    background: #007bff; 
    color: white; 
}  
.tgb-access-badge.tgb-elite-access { 
    background: #ffc107; 
    color: #212529; 
}

/* Content access indicators */
.tgb-padlock {
    position: relative;
}

.tgb-padlock::before {
    content: "🔒";
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
}

/* Paywall styling */
.tgb-paywall {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tgb-paywall h2 {
    color: #495057;
    margin-bottom: 20px;
}

.tgb-paywall h3 {
    color: #6c757d;
    font-size: 1.3em;
    margin: 20px 0 15px 0;
}

.tgb-paywall .paywall-excerpt {
    color: #6c757d;
    font-style: italic;
    margin: 20px 0;
    line-height: 1.6;
}

.tgb-paywall .paywall-thumbnail {
    margin: 20px 0;
    opacity: 0.7;
    filter: blur(2px);
}

.tgb-paywall .btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 10px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tgb-paywall .btn-primary {
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
}

.tgb-paywall .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.tgb-paywall .btn-secondary {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.tgb-paywall .btn-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

/* Engagement buttons */
.tgb-engagement-buttons {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    padding: 15px 0;
    border-top: 1px solid #dee2e6;
}

.tgb-like-btn, .tgb-favourite-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tgb-like-btn:hover, .tgb-favourite-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

.tgb-like-btn.liked {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.tgb-favourite-btn.favourited {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

/* Search functionality */
.tgb-search-container {
    position: relative;
    margin: 20px 0;
}

#tgb-search {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#tgb-search:focus {
    outline: none;
    border-color: #007bff;
}

.tgb-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.tgb-search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tgb-search-result-item:hover {
    background: #f8f9fa;
}

/* Carousel styling */
.tgb-carousel {
    margin: 30px 0;
}

.tgb-carousel-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    color: #495057;
}

.tgb-carousel-container {
    overflow-x: auto;
    padding: 10px 0;
}

.tgb-carousel-items {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
}

.tgb-carousel-item {
    flex: 0 0 300px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tgb-carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.tgb-carousel-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.tgb-carousel-item-content {
    padding: 15px;
}

.tgb-carousel-item h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.tgb-carousel-item p {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

/* User profile styling */
.tgb-user-tier-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tgb-user-tier-free {
    background: #e8f5e8;
    color: #28a745;
}

.tgb-user-tier-pro {
    background: #e3f2fd;
    color: #007bff;
}

.tgb-user-tier-elite {
    background: #fff8e1;
    color: #ffc107;
}

/* NewsUp integration overrides */
.newsup-article-meta .tgb-access-badge {
    margin-left: 10px;
    vertical-align: middle;
}

.entry-content .tgb-access-badge {
    margin-bottom: 20px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .tgb-access-badge {
        font-size: 9px;
        padding: 3px 6px;
        margin-left: 5px;
    }
    
    .tgb-paywall {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .tgb-paywall .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
    
    .tgb-engagement-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .tgb-carousel-item {
        flex: 0 0 280px;
    }
    
    .tgb-carousel-items {
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .tgb-padlock::before {
        font-size: 12px;
        padding: 3px 4px;
        top: 5px;
        right: 5px;
    }
    
    .tgb-carousel-item {
        flex: 0 0 260px;
    }
}

/* Loading states */
.tgb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: tgb-spin 1s linear infinite;
}

@keyframes tgb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.tgb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
.tgb-like-btn:focus, 
.tgb-favourite-btn:focus,
#tgb-search:focus,
.tgb-paywall .btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}