/**
 * Newsletter Archive Styles
 *
 * @package City_Newsletter
 */

/* ============================================
   ARCHIVE LIST
   ============================================ */
.cn-newsletter-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.cn-newsletter-archive-grid {
    display: grid;
    gap: 20px;
}

.cn-newsletter-archive-grid.cn-columns-1 {
    grid-template-columns: 1fr;
}

.cn-newsletter-archive-grid.cn-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cn-newsletter-archive-grid.cn-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Archive Item */
.cn-newsletter-archive-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cn-newsletter-archive-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.cn-newsletter-archive-link {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    gap: 15px;
}

.cn-newsletter-archive-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cn-newsletter-archive-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: white;
}

.cn-newsletter-archive-content {
    flex: 1;
    min-width: 0;
}

.cn-newsletter-archive-title {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3a5f;
    line-height: 1.3;
}

.cn-newsletter-archive-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.cn-newsletter-archive-excerpt {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.cn-newsletter-archive-arrow {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #ccc;
    transition: transform 0.2s ease, color 0.2s ease;
}

.cn-newsletter-archive-item:hover .cn-newsletter-archive-arrow {
    transform: translateX(5px);
    color: #1e3a5f;
}

/* Empty State */
.cn-newsletter-archive-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cn-newsletter-archive-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.cn-newsletter-archive-empty p {
    color: #666;
    margin: 0;
    font-size: 1.1rem;
}

/* Pagination */
.cn-newsletter-archive-pagination {
    margin-top: 30px;
    text-align: center;
}

.cn-newsletter-archive-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.cn-newsletter-archive-pagination .page-numbers:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.cn-newsletter-archive-pagination .page-numbers.current {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: white;
}

/* ============================================
   SINGLE NEWSLETTER VIEW
   ============================================ */
.cn-newsletter-single-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cn-newsletter-single-header {
    text-align: center;
    margin-bottom: 30px;
}

.cn-newsletter-single-nav {
    margin-bottom: 20px;
}

.cn-back-to-archive {
    display: inline-block;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cn-back-to-archive:hover {
    color: #d4a84b;
}

.cn-newsletter-single-title {
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: #1e3a5f;
}

.cn-newsletter-single-date {
    color: #666;
    font-size: 1rem;
}

.cn-newsletter-single-date .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

/* Newsletter Frame */
.cn-newsletter-single-content {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.cn-newsletter-frame {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.cn-newsletter-frame table {
    width: 100% !important;
}

/* Footer */
.cn-newsletter-single-footer {
    text-align: center;
}

.cn-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cn-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.cn-btn-secondary:hover {
    background: #e0e0e0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .cn-newsletter-archive-grid.cn-columns-2,
    .cn-newsletter-archive-grid.cn-columns-3 {
        grid-template-columns: 1fr;
    }
    
    .cn-newsletter-archive-link {
        padding: 15px;
    }
    
    .cn-newsletter-archive-icon {
        width: 40px;
        height: 40px;
    }
    
    .cn-newsletter-archive-icon .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
    
    .cn-newsletter-single-wrap {
        padding: 20px 15px;
    }
    
    .cn-newsletter-single-title {
        font-size: 1.5rem;
    }
    
    .cn-newsletter-single-content {
        padding: 10px;
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }
}
