/*
 Theme Name: Twenty Seventeen Child
 Template: twentyseventeen
*/

@import url("../twentyseventeen/style.css");

html {
    height: 100%;
    margin: 0;
    margin-top: 0 !important;
}

body:not(.wp-admin) {
    height: 100%;
    margin: 0;
}

body:not(.wp-admin),
button,
input,
select,
textarea {
    font-family: "Zen Old Mincho", serif !important;
    font-weight: 500;
}

pre {
    padding: 0;
}


.background-fixed {
    margin-top: 0 !important;
}

/* 全体 */
.layout-row {
    height: 100vh;
}

/* メインだけスクロール */
.main-content {
    overflow-y: auto;
}


input::placeholder,
textarea::placeholder {
    color: gray;
}


.left-sidebar form {
    font-size: 0.8rem;
}

.date-text {
    font-size: small;
}

/* #region 右サイドバー */

/* カレンダー */
.wp-calendar-table thead {
    display: none;
}

.wp-calendar-table td {
    text-align: center;
    color: rgb(107, 106, 106);
}

.wp-calendar-table a {
    font-weight: 600;
    color: rgb(31, 30, 30);
}

.wp-calendar-table caption {
    display: none;
}

.wp-calendar-nav {
    display: none;
}

/* 過去記事 */

.past-article {
    font-size: 0.9rem;
}

.ranking-number {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.crown-1 {
    color: #AE8803;
}

.crown-2 {
    color: #494B4B;
}

.crown-3 {
    color: #663700;
}

.rating-stars {
    color: #f5b301;
}

.rating-label {
    width: 110px;
    flex-shrink: 0;
}


.pagination-wrap {
    margin-top: 40px;
}

.custom-pagination {
    display: flex;
    flex-wrap: wrap;

    padding: 12px;
    margin: 0;
    list-style: none;
}

.custom-pagination .page-item .page-link {
    border: none;

    background: #fff;
    color: #333;

    border-radius: 14px;


    font-size: 0.7rem;
    font-weight: 500;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06);

    transition:
        all 0.2s ease;
}

/* hover */
.custom-pagination .page-item .page-link:hover {
    transform: translateY(-2px);

    background: #f8f9fa;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.10);
}

/* active */
.custom-pagination .page-item.active .page-link {
    background: #111;
    color: #fff;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.15);
}

/* disabled */
.custom-pagination .page-item.disabled .page-link {
    opacity: 0.45;
    pointer-events: none;
}


/* キーワード検索・サジェスト */

/* カテゴリー */
#cat-select-ts-control,
.ts-wrapper {
    min-width: 120px;
    flex-shrink: 0;
}

/* 入力＋ボタン横並び */

.search-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}

.search-row input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.search-row button {
    padding: 10px 14px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.search-row button:hover {
    background: #357abd;
}


/* サジェスト */
#suggest-list {
    list-style: none;
    /* ←点消す */
    margin: 4px 0 0;
    padding: 0;

    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;

    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);

    z-index: 1;
}

/* サジェスト項目 */
#suggest-list li {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

/* hover */
#suggest-list li:hover {
    background: #f5f7fb;
}

/* #endregion */

/* #region 管理者情報 */

.sidebar {
    display: flex;
    position: sticky;
    top: 10px;
    flex-direction: column;
    gap: 12px;
}

/* カード */
.sidebar-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: 0.2s;
}

/* タイトル */
.sidebar-card h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* 管理者情報 */
.admin-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}

.admin-email {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-tel a {
    display: inline-block;
    font-size: 13px;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

.admin-tel a:hover {
    text-decoration: underline;
}

/* #endregion */

/* #region RSS */

.rss-wrap {
    width: 100%;
    max-width: 100%;
}

.rss-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #222;
}

.rss-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* カード */
.rss-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    min-width: 0;
    padding: 14px 16px;
    border-radius: 12px;

    background: #fff;
    border: 1px solid #eee;

    text-decoration: none;
    color: #333;

    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.rss-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #dfe7ff;
}

/* タイトル */
.rss-card-title {
    font-size: 14px;
    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 矢印 */
.rss-card-arrow {
    color: #aaa;
    font-size: 16px;
    transition: 0.2s;
}

.rss-card:hover .rss-card-arrow {
    color: #4a90e2;
    transform: translateX(3px);
}

/* #endregion */

/* #region タグ検索 */

.tag-card .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* タグ本体 */
.tag-item {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 6px 12px;
    border-radius: 999px;

    background: #f3f4f6;
    color: #333;
    text-decoration: none;

    font-size: 13px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* ホバー */
.tag-item:hover:not(.no-link) {
    background: #111827;
    color: #fff;
    transform: translateY(-2px);
    border-color: #111827;
}

/* 件数バッジ */
.tag-count {
    margin-left: auto;
    background: #e5e7eb;
    color: #111;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 999px;
}

/* ホバー時バッジ */
.tag-item:hover:not(.no-link) .tag-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* #endregion */

/* #region ログイン関連 */

.login-label {
    min-width: 100px;
    white-space: nowrap;
}

/* ベースカード（既存を活かしつつ強化） */
.sidebar-card--modern {
    /* 近年っぽいソフトUI */
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.85),
            rgba(255, 255, 255, 0.65));

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border: 1px solid rgba(255, 255, 255, 0.45);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* リンク */
.sidebar-card--modern a {
    display: block;
    padding: 10px 12px;

    border-radius: 12px;
    text-decoration: none;

    font-weight: 600;
    color: #111827;

    background: rgba(59, 130, 246, 0.08);

    transition: all 0.2s ease;
}

.sidebar-card--modern a:hover {
    transform: translateX(4px);
    background: rgba(59, 130, 246, 0.16);
}



.comment-btn {
    border-radius: 12px;

    border: none;
    cursor: pointer;

    font-weight: 600;
    color: #fff;

    background-color: #4A90E2;

    box-shadow: 0 10px 20px rgba(97, 97, 99, 0.25);

    transition: all 0.2s ease;
}

.comment-btn:hover {
    background-color: #3b73b3 !important;
}

.comment-btn:active {
    transform: scale(0.95);
    background-color: #3b73b3 !important;
}



/* ログインボタン */
.login-button {
    border-radius: 12px;

    border: none;
    cursor: pointer;

    font-weight: 600;
    color: #fff;

    background: linear-gradient(135deg, #4778c2, #dc2626);

    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);

    transition: all 0.2s ease;
}

.login-button:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #4778c2, #dc2626);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.35);
}

.login-button:active {
    transform: scale(0.98);
}

/* ログアウトボタン */
.sidebar-card--modern #logoutBtn {
    padding: 10px 12px;
    border-radius: 12px;

    border: none;
    cursor: pointer;

    font-weight: 600;
    color: #fff;

    background: linear-gradient(135deg, #ef4444, #dc2626);

    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);

    transition: all 0.2s ease;
}

.sidebar-card--modern #logoutBtn:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.35);
}

.sidebar-card--modern #logoutBtn:active {
    transform: scale(0.98);
}

/* #endregion */


.label-fixed {
    width: 170px;
    margin-right: 20px;
    align-self: center;
}

.input-error {
    margin-left: 150px;
    min-height: 25px;
}

@media (max-width: 600px) {
    .input-error {
        font-size: 0.6rem;
    }

    .register-form label {
        font-size: 0.8rem;
    }
}

/* #region 星・前後記事ボタン */
.star {
    cursor: default;
    user-select: none;
}

.star-inner {
    cursor: pointer;
}

.prev-next-article {
    font-size: 0.9rem;
}

/* #endregion */

/* #region ブックマーク関連 */

.bookmark-delete {
    font-size: 0.6rem;
    background-color: white;
    color: gray;
    border: 2px solid gray;
    border-radius: 5px;
    align-items: center;
    justify-content: center;
}

.bookmark-btn {
    border: none;
}

/* #endregion */


.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}




.pagination .dots {
    display: none !important;
}

.first-page a,
.last-page a {
    display: none !important;
}


/* #region ローディング */

#loading {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #fff;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.5s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* #endregion */

@media (max-width: 767px) {
    .left-sidebar-wrapper {
        order: 1;
    }

    .right-sidebar-wrapper {
        order: 2;
    }

    .main-content {
        order: 3;
    }
}