/**
 * TPP Issues Plugin v2 - Frontend Styles
 * 
 * @package TPP_Issues_V2
 * @since 2.0.0
 */

.tpp-issue-article a {
  position: relative;
  background: linear-gradient(to top, #FFD233 50%, transparent 50%);
  mix-blend-mode: multiply;
  color: #000;
  text-decoration: none !important;
}

/* Issue Posts Container */
.tpp-issue-posts {
    margin: 20px 0;
}

.tpp-issue-posts.tpp-excerpt-mode {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Individual Article Styling */
.tpp-issue-article {
    margin-bottom: 30px;
    position: relative;
}

.tpp-issue-article.tpp-target-article {
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    padding: 20px;
    border-radius: 5px;
}

.tpp-issue-article.tpp-highlighted {
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0% { background-color: transparent; }
    50% { background-color: #ffeaa7; }
    100% { background-color: transparent; }
}

/* Excerpt Mode Styling */
.tpp-excerpt-article {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.tpp-excerpt-article:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tpp-excerpt-article h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.tpp-excerpt-article h2 a {
    text-decoration: none;
    color: #333;
}

.tpp-excerpt-article h2 a:hover {
    color: #0073aa;
}

/* Thumbnail Styling */
.article-thumbnail,
.post-thumbnail {
    margin: 15px 0;
}

.article-thumbnail img,
.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Excerpt and Meta */
.article-excerpt,
.post-excerpt {
    margin: 15px 0;
    color: #666;
    line-height: 1.6;
}

.article-meta,
.post-meta {
    font-size: 0.9em;
    color: #999;
    margin: 10px 0;
}

.read-more {
    margin-top: 15px;
}

.read-more a {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.read-more a:hover {
    background: #005177;
}

/* Error and No Posts Messages */
.tpp-error,
.tpp-no-posts {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.tpp-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* AJAX Loading */
.tpp-ajax-container {
    min-height: 100px;
    position: relative;
}

.tpp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.tpp-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Navigation Links */
.tpp-issue-link,
.tpp-article-link {
    display: inline-block;
    background: #f0f0f1;
    color: #2c3338;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tpp-issue-link:hover,
.tpp-article-link:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Fallback Content Styling */
.tpp-fallback-content {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
}

.tpp-fallback-content h2 {
    margin-top: 0;
    color: #333;
}

.tpp-fallback-content h2 a {
    text-decoration: none;
    color: inherit;
}

.tpp-fallback-content h2 a:hover {
    color: #0073aa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tpp-issue-posts.tpp-excerpt-mode {
        grid-template-columns: 1fr;
    }
    
    .tpp-issue-article.tpp-target-article {
        padding: 15px;
    }
    
    .tpp-excerpt-article {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .tpp-issue-article.tpp-target-article {
        padding: 10px;
    }
    
    .read-more a {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

/* Print Styles */
@media print {
    .tpp-issue-article {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .read-more,
    .tpp-issue-link,
    .tpp-article-link {
        display: none;
    }
}
