/**
 * Custom Post Tabs Plugin Styles
 */

.cpt-container {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    position: relative;
}

/* Tab Navigation */
.cpt-tabs {
    display: flex;
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
    flex-wrap: wrap;
    border-bottom: none;
}

.cpt-tab {
    padding: 10px 20px;
    margin: 0 5px 0 0;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: normal;
    font-size: 14px;
    text-align: center;
}

.cpt-tab:hover {
    background-color: #f8f8f8;
}

.cpt-tab.cpt-active {
    background-color: #fff;
    border: 2px solid #333;
    font-weight: bold;
    color: #333;
}

/* Year Filter */
.cpt-filter {
    position: absolute;
    top: 0;
    right: 0;
    margin-bottom: 20px;
}

.cpt-year-filter {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    min-width: 150px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0 0l6 6 6-6z" fill="%23333"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Content Area */
.cpt-content {
    background-color: #fff;
    padding: 0;
}

/* Post List */
.cpt-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cpt-post-item {
    padding: 15px 0;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.cpt-post-item:last-child {
    border-bottom: none;
}

.cpt-post-date {
    font-size: 14px;
    color: #666;
    margin-right: 15px;
    min-width: 80px;
}

.cpt-post-category {
    background-color: #999;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    margin-right: 15px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

/* Category-specific colors */
.cpt-post-category[data-category="ニュース"] {
    background-color: #6495ED; /* cornflowerblue */
}

.cpt-post-category[data-category="HQ公式情報"] {
    background-color: #20B2AA; /* lightseagreen */
}

.cpt-post-category[data-category="ブログ"] {
    background-color: #FF8C00; /* darkorange */
}

.cpt-post-category[data-category="EduDXレポート"] {
    background-color: #9370DB; /* mediumpurple */
}

.cpt-post-title {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    flex: 1;
    font-weight: normal;
}

.cpt-post-title:hover {
    color: #0073aa;
    text-decoration: underline;
}

.cpt-no-posts {
    font-style: italic;
    color: #666;
    padding: 20px 0;
    text-align: center;
}

/* Pagination */
.cpt-pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.cpt-prev-page,
.cpt-next-page,
.cpt-page-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.cpt-pagination-ellipsis {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
}

.cpt-prev-page:hover,
.cpt-next-page:hover,
.cpt-page-number:hover {
    background-color: #f8f8f8;
}

.cpt-prev-page.disabled,
.cpt-next-page.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cpt-page-number.current {
    background-color: #333;
    color: #fff;
    border-color: #333;
    font-weight: bold;
}

/* Hide the page info text */
.cpt-page-info {
    display: none;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .cpt-filter {
        position: static;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    .cpt-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .cpt-tab {
        margin: 0 5px 5px 0;
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .cpt-post-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cpt-post-date,
    .cpt-post-category {
        margin-bottom: 5px;
    }
    
    .cpt-post-title {
        width: 100%;
        margin-top: 5px;
    }
}
