/*
Theme Name: SWELL CHILD
Template: swell
Version: 1.0.1
Author: LOOS, Inc. & Antigravity
*/

/*
 * SWELL Custom Design Overhaul
 * Theme: Pop & Exciting Anime Store (Forced Collapse Ver.)
 */
/* 1. 全体の背景 */
body {
    background-color: #f9f9f9;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
}

/* 2. ヘッダー */
.l-header,
.l-fixHeader {
    background: linear-gradient(90deg, #2b2b2b 0%, #444 100%) !important;
    border-bottom: 4px solid #007cba;
}

.c-headLogo__link,
.c-headLogo__link:hover {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 3. トップ画像文字 */
.p-mainVisual__textTitle {
    color: #fff !important;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    font-weight: 900 !important;
    letter-spacing: 0.1em;
}

/* 4. 画像切れ防止 */
.post_thumbnail img,
.c-postThumb__figure img,
.p-postList__thumb img,
.widget_media_image img {
    object-fit: contain !important;
    background-color: #ffffff;
    height: 100% !important;
    width: 100% !important;
}

/* 5. 画像付きリストの修正（巨大化防止） */
.anime-sidebar-item {
    display: flex;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px dashed #eee;
    color: #333 !important;
    text-decoration: none !important;
    transition: background 0.2s;
}

.anime-sidebar-item:hover {
    background: #f0f8ff;
    padding-left: 8px;
}

.anime-sidebar-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 6px;
    margin-right: 10px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.anime-sidebar-name {
    font-size: 0.95rem;
    font-weight: bold;
}

/* 6. 標準検索ウィジェット */
.widget_search .search-form {
    position: relative;
    border: 3px solid #ffdde5;
    border-radius: 30px;
    padding: 5px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(255, 182, 193, 0.3);
}

.widget_search .search-field {
    border: none !important;
    background: transparent !important;
    width: 100%;
    padding: 10px 15px !important;
    outline: none !important;
    color: #555;
}

.widget_search .search-submit {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: #ff4081 !important;
    color: #fff !important;
    border-radius: 50% !important;
    border: none !important;
    font-size: 0 !important;
    cursor: pointer;
    transition: transform 0.2s;
}

.widget_search .search-submit::before {
    content: '🔍';
    font-size: 1.2rem;
    color: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.widget_search .search-submit:hover {
    transform: scale(1.1);
}

/* 7. 標準カテゴリーウィジェット（親は表示） */
.widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 2px solid #b3e5fc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(179, 229, 252, 0.3);
}

.widget_categories ul li {
    border-bottom: 1px dashed #eee;
    padding: 0;
    margin: 0;
    position: relative;
}

.widget_categories ul li a {
    display: block;
    padding: 12px 15px;
    color: #555 !important;
    text-decoration: none !important;
    transition: background 0.2s;
    font-weight: bold;
}

.widget_categories ul li a:hover {
    background: #fff9fa;
    color: #ff4081 !important;
    padding-left: 20px;
}

/* ★子カテゴリーは「強制的に」隠す★ */
.widget_categories ul.children,
.widget_categories ul.sub-menu {
    display: none !important;
    /* ←これが修正点です！ */
    position: absolute;
    top: -5px;
    left: 95%;
    width: 240px;
    background-color: #fff;
    border: 2px solid #ff4081;
    border-radius: 8px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 5px 0 !important;
    max-height: 400px;
    overflow-y: auto;
}

/* ＋ボタンが押されたとき（activeクラス）だけ表示 */
.widget_categories li.active>ul.children,
.widget_categories li.active>ul.sub-menu {
    display: block !important;
    animation: popIn 0.2s;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateX(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

/* 子カテゴリーリスト */
.widget_categories ul.children li,
.widget_categories ul.sub-menu li {
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.widget_categories ul.children li a,
.widget_categories ul.sub-menu li a {
    padding: 10px 15px !important;
    color: #333 !important;
    font-size: 0.9rem;
}

.widget_categories ul.children li a:hover,
.widget_categories ul.sub-menu li a:hover {
    background: #ffdde5;
    color: #ff4081 !important;
    padding-left: 15px;
}

.widget_categories ul.children li a:before,
.widget_categories ul.sub-menu li a:before {
    content: none;
}

/* 開閉ボタン */
.accordion-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #b3e5fc;
    color: #0288d1;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    z-index: 10;
}

.accordion-btn:hover {
    background: #e1f5fe;
}

.widget_categories li.active>.accordion-btn {
    background: #ff4081;
    color: #fff;
    border-color: #ff4081;
    transform: rotate(90deg);
}

/* ウィジェットタイトル */
.c-widget__title {
    color: #333 !important;
    border-left: none !important;
    border-bottom: 2px dashed #ffdde5;
    padding-bottom: 10px;
    margin-bottom: 15px !important;
    text-align: center;
    font-size: 1.1rem !important;
}