/* ===== ドロワーメニュー拡張スタイル ===== */

/* トップリンク */
.drawer-top-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.drawer-top-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--primary-light);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.drawer-top-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(3px);
}
.drawer-top-icon {
    font-size: 1.1rem;
}

/* 検索ボックス */
.drawer-search {
    margin-bottom: 15px;
}
.drawer-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg-body);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}
.drawer-search-input:focus {
    border-color: var(--primary);
}
.drawer-search-input::placeholder {
    color: var(--text-muted);
}

/* カテゴリ */
.drawer-category {
    margin-bottom: 4px;
    border-radius: 10px;
    overflow: hidden;
}
.drawer-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    background: var(--bg-body);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
}
.drawer-category-header:hover {
    background: var(--primary-light);
}
.drawer-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.drawer-category-icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.drawer-category-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drawer-category-count {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}
.drawer-category-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 5px;
}
.drawer-category.open .drawer-category-arrow {
    transform: rotate(90deg);
}

/* カテゴリリスト（閉じた状態） */
.drawer-category-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.drawer-category.open .drawer-category-list {
    max-height: 5000px;
    overflow-y: auto;
}

/* 個別リンク */
.drawer-item-link {
    display: block;
    padding: 9px 14px 9px 36px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.15s;
    line-height: 1.4;
    position: relative;
}
.drawer-item-link::before {
    content: '›';
    position: absolute;
    left: 20px;
    color: var(--primary);
    font-weight: 800;
    font-size: 1rem;
}
.drawer-item-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    padding-left: 40px;
}
.drawer-item-link:last-child {
    border-bottom: none;
}

/* ドロワーメニューの幅を拡大（リンクが多いため） */
.drawer-menu {
    width: 320px !important;
    right: -340px !important;
}
.drawer-menu.open {
    right: 0 !important;
}

/* スマホ対応 */
@media (max-width: 480px) {
    .drawer-menu {
        width: 85vw !important;
        right: -90vw !important;
    }
    .drawer-category-name {
        font-size: 0.85rem;
    }
    .drawer-item-link {
        font-size: 0.82rem;
        padding: 8px 12px 8px 30px;
    }
    .drawer-item-link::before {
        left: 14px;
    }
}
